[Bug 21512] New: Windows PowerShell 1.x/2.x needs HKEY_CURRENT_USER\Environment registry key present

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jan 27 16:20:25 CST 2010


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

           Summary: Windows PowerShell 1.x/2.x needs
                    HKEY_CURRENT_USER\Environment registry key present
           Product: Wine
           Version: 1.1.37
          Platform: x86
               URL: http://www.microsoft.com/downloads/details.aspx?Family
                    Id=60cb5b6c-6532-45e0-ab0f-a94ae9ababf5&displaylang=en
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

prerequisite: .NET 2.0 SP1 + Windows Management Framework Core (contains
PowerShell 2.0)

The shell must be started with wineconsole otherwise it refuses to work at all
(GetConsoleScreenBufferInfo).

--- snip ---
$ pwd
/home/focht/.wine/drive_c/windows/system32/WindowsPowerShell/v1.0

$ wineconsole PowerShell.exe
err:wineconsole:WCUSER_SetFont wrong font
err:wineconsole:WCUSER_SetFont wrong font
err:wineconsole:WCUSER_SetFont wrong font
err:wineconsole:WCUSER_SetFont wrong font
fixme:sync:CreateMemoryResourceNotification (0) stub
fixme:advapi:RegisterEventSourceW (L".",L"PowerShell"): stub
fixme:advapi:ReportEventW
(0xcafe4242,0x0001,0x0001,0x00000067,(nil),0x0002,0x00000000,0x9e3d08,0x9e3bb0):
stub
err:eventlog:ReportEventW L"Object reference not set to an instance of an
object."
err:eventlog:ReportEventW
L"\tExceptionClass=NullReferenceException\n\tErrorCategory=\n\tErrorId=\n\tErrorMessage=Object
reference not set to an instance of an
object.\n\n\tSeverity=Error\n\n\tSequenceNumber=\n\n\tHostName=ConsoleHost\n\tHostVersion=2.0\n\tHostId=6bba2119-20f0-4b91-b68d-db6df8c2a470\n\tEngineVersion=2.0\n\tRuns"...
--- snip ---

The relay log shows that the app queries the "PSMODULEPATH" environment
variable from different locations.

process -> GetEnvironmentVariable()
machine -> registry,
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment
user -> registry, HKEY_CURRENT_USER\Environment

The latter one isn't present, hence it fails.

--- snip ---
...
0032:Call advapi32.RegOpenKeyExW(80000001,030d24ac
L"Environment",00000000,00020019,0033e484) ret=00dcac27
0032:Call ntdll.RtlInitUnicodeString(0033e3b0,030d24ac L"Environment")
ret=6832a7ee
0032:Ret  ntdll.RtlInitUnicodeString() retval=0033e3b0 ret=6832a7ee
0032:Call ntdll.NtOpenKey(0033e484,00020019,0033e3b8) ret=6832a80a
0032:Ret  ntdll.NtOpenKey() retval=c0000034 ret=6832a80a
0032:Call ntdll.RtlNtStatusToDosError(c0000034) ret=6832a815
0032:Ret  ntdll.RtlNtStatusToDosError() retval=00000002 ret=6832a815
0032:Ret  advapi32.RegOpenKeyExW() retval=00000002 ret=00dcac27
...
0032:trace:seh:raise_exception code=c0000005 flags=0 addr=0x33b36ca ip=033b36ca
tid=0032
...
--- snip ---

Creating "HKEY_CURRENT_USER\Environment" key lets the shell successfully
proceed.
Add to wine.inf.in

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list