[Bug 21549] New: Windows PowerShell 1.x installer dies on unimplemented function USERENV.dll.138

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jan 30 07:42:03 CST 2010


           Summary: Windows PowerShell 1.x installer dies on unimplemented
                    function USERENV.dll.138
           Product: Wine
           Version: 1.1.37
          Platform: x86
               URL: http://www.google.de/search?q=WindowsXP-KB926139-v2-x8
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


after working around bug 21542, the installer dies in post-install action:

--- snip ---
0030:Starting process
0030:Call shlwapi.PathFileExistsW(0033ad50 L"C:\\users\\Public\\Start
Menu\\Programs") ret=68ad8ae7
0030:Call KERNEL32.SetErrorMode(00000001) ret=68c4a703
0030:Ret  KERNEL32.SetErrorMode() retval=00008005 ret=68c4a703
0030:Call KERNEL32.GetFileAttributesW(0033ad50 L"C:\\users\\Public\\Start
Menu\\Programs") ret=68c4a714
0030:Ret  KERNEL32.GetFileAttributesW() retval=00000010 ret=68c4a714
0030:Call KERNEL32.SetErrorMode(00008005) ret=68c4a725
0030:Ret  KERNEL32.SetErrorMode() retval=00000001 ret=68c4a725
0030:Ret  shlwapi.PathFileExistsW() retval=00000001 ret=68ad8ae7
0030:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0033b00c
Menu\\Programs",ffffffff,0033b33c,00000104,00000000,00000000) ret=68ad8d7d
0030:Ret  KERNEL32.WideCharToMultiByte() retval=00000024 ret=68ad8d7d
0030:Ret  shell32.SHGetSpecialFolderPathA() retval=00000001 ret=01072df8
0030:Call KERNEL32.FindFirstFileA(0033b544 "C:\\users\\Public\\Start
Menu\\Programs\\Windows PowerShell 1.0\\@.lnk",0033b18c) ret=0106da6d
0030:Ret  KERNEL32.FindFirstFileA() retval=ffffffff ret=0106da6d
0030:trace:seh:raise_exception code=80000100 flags=1 addr=0x7bc4af8a
ip=7bc4af8a tid=0030
0030:trace:seh:raise_exception  info[0]=0108d004
0030:trace:seh:raise_exception  info[1]=0000008a
wine: Call from 0x7bc4af8a to unimplemented function USERENV.dll.138, aborting
0030:trace:seh:call_vectored_handlers calling handler at 0x68ec9e52
code=80000100 flags=1
0030:trace:seh:call_vectored_handlers handler at 0x68ec9e52 returned 0
0030:trace:seh:call_vectored_handlers calling handler at 0x6879bdc6
code=80000100 flags=1
0030:trace:seh:call_vectored_handlers handler at 0x6879bdc6 returned 0
0030:trace:seh:call_stack_handlers calling handler at 0x1066099 code=80000100
0030:Call msvcrt._except_handler3(0033b25c,0033f37c,0033aeec,0033add0)
--- snip ---

Dumping userenv imports for the installer:

--- snip ---
$ winedump -j import update.exe
  offset 0008c2f4 USERENV.dll
  Hint/Name Table: 0008D824
  TimeDateStamp:   00000000 (Thu Jan  1 01:00:00 1970)
  ForwarderChain:  00000000
  First thunk RVA: 000017F8
  Ordn  Name
   138  <by ordinal>
   121  <by ordinal>
   119  <by ordinal>
--- snip ---

Actually only ordinal 138 seems to get used (Wine 'Windows XP' config).

Unfortunately I didn't find anything useful about this one (MSDN, blogs, Bing
..) :-(

By analyzing the caller stack setup we can deduce the necessary information to
create a simple stub.

The installer calls the ordinal like this:

--- snip ---
$ winedbg disas
0x01072e9b: pushl    0xffffff88(%ebp)
0x01072e9e: leal    0xbc(%ebp),%eax
0x01072ea4: pushl    %eax
0x01072ea5: leal    0x5d0(%ebp),%eax
0x01072eab: pushl    %eax
0x01072eac: pushl    0xffffff9c(%ebp)
0x01072eaf: leal    0x2c4(%ebp),%eax
0x01072eb5: pushl    0xffffffa0(%ebp)
0x01072eb8: pushl    %eax
0x01072eb9: pushl    0xffffffa4(%ebp)
0x01072ebc: leal    0x4cc(%ebp),%eax
0x01072ec2: pushl    %eax
0x01072ec3: leal    0x3c8(%ebp),%eax
0x01072ec9: pushl    %eax
0x01072eca: leal    0x7d8(%ebp),%eax
0x01072ed0: pushl    %eax
0x01072ed1: leal    0x6d4(%ebp),%eax
0x01072ed7: pushl    %eax
0x01072ed8: pushl    0xffffffb4(%ebp)
0x01072edb: call    *0x10017f8 -> 0x00450000
0x01072ee1: cmpl    %ebx,%eax
0x01072ee3: movl    %eax,0xffffffa8(%ebp)
0x01072ee6: jnz    0x01072f0c
--- snip ---

number of arguments: 12
calling conv: stdcall
return type: most likely boolean (like the other known userenv API).

Armed with this information one can add a simple stub, export with ordinal 138,
-noname and 12 ptr params, name it whatever you like.
If you find any documented name, feel free to use it.

If we fake the stub to return FALSE, following messages will be logged to:

--- snip ---
 Failed To Create Link -3 Windows PowerShell
 Failed To Create Link -3 Release Notes
 Failed To Create Link -3 Getting Started
 Failed To Create Link -3 User Guide
 Failed To Create Link -3 Quick Reference
--- snip ---

So this API is most likely some Lnk creation stuff.

Anyway, that simple stub is sufficient to let the installer proceed with its
post-install steps.

In the end, the installer runs into bug 16876 (bug in property sheet control).


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