[Bug 25740] New: setupapi: registry values missing %token% replacement (dynamic strings, updspapi) (Windows PowerShell 2.0)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jan 9 14:25:24 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=25740

           Summary: setupapi: registry values missing %token% replacement
                    (dynamic strings, updspapi) (Windows PowerShell 2.0)
           Product: Wine
           Version: 1.3.11
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: setupapi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

trying to start the Windows PowerShell Integrated Scripting Environment (ISE)
after installing Windows PowerShell 2.0 fails.

--- snip ---
$ wine powershell_ise.exe
...
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.ArgumentNullException:
Value cannot be null.
Parameter name: window
   at System.Windows.MessageBox.Show(Window owner, String messageBoxText,
String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult
defaultResult)
   at Microsoft.Windows.PowerShell.Gui.Internal.Program.Initialize()
   --- End of inner exception stack trace ---
   at Microsoft.Windows.PowerShell.GuiExe.Internal.GPowerShell.Main(String[]
args)
wine: Unhandled exception 0xe0434f4d at address 0x7b838ce2 (thread 0009),
starting debugger...
--- snip ---

The real cause is the inability to locate/load the assembly
"CompiledComposition.Microsoft.PowerShell.GPowerShell.dll" leading to later
crash.

The path to assembly is resolved using registry:

--- snip ---
0026:Call advapi32.RegOpenKeyExW(80000002,009bf828
L"Software\\Microsoft\\PowerShell\\1\\PowerShellEngine",00000000,00020019,0032ece8)
ret=0036a6a7
0026:Ret  advapi32.RegOpenKeyExW() retval=00000000 ret=0036a6a7
...
0026:Call advapi32.RegQueryValueExW(00000180,009bf770
L"ApplicationBase",00000000,0032ed18,00000000,0032ed1c) ret=0036a7aa
0026:Ret  advapi32.RegQueryValueExW() retval=00000000 ret=0036a7aa
...
0026:Call KERNEL32.GetFullPathNameW(0032ea1c
L"%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\CompiledComposition.Microsoft.PowerShell.GPowerShell.dll",00000105,0032e810,00000000)
ret=0036a1c3
0026:Ret  KERNEL32.GetFullPathNameW() retval=00000073 ret=0036a1c3
--- snip ---

Registry export:

--- snip ---
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellEngine]
"ApplicationBase"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0"
"ConsoleHostAssemblyName"="Microsoft.PowerShell.ConsoleHost,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35,ProcessorArchitecture=msil"
"ConsoleHostModuleName"="\"%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""
"PowerShellVersion"="2.0"
"PSCompatibleVersion"="1.0,2.0"
"RuntimeVersion"="v2.0.50727"
--- snip ---

The path contains "%SystemRoot%" token which should have been deformated at
_install_ time (.NET app code directly takes the path string).



More information about the wine-bugs mailing list