http://bugs.winehq.org/show_bug.cgi?id=29775
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|msi |-unknown
--- Comment #2 from Anastasius Focht focht@gmx.net 2012-02-02 19:01:57 CST --- Hello,
it's not InstallShield MSI setup but InstallScript setup written purely in InstallShield Script code which gets crypted.
The dialog in question is "SdCustomerInformation"
http://kb.flexerasoftware.com/doc/Helpnet/installshield14langref/LangrefSdCu...
The "Next" button is created as "visible" from dialog template:
--- snip --- ... 0024:Call KERNEL32.FindResourceA(003c0000,00002f16,00000005) ret=00cb4505 0024:Ret KERNEL32.FindResourceA() retval=003c1520 ret=00cb4505 0024:Call KERNEL32.LoadResource(003c0000,003c1520) ret=00cb4517 0024:Ret KERNEL32.LoadResource() retval=003c7fc0 ret=00cb4517 0024:Call KERNEL32.LockResource(003c7fc0) ret=00cb4522 0024:Ret KERNEL32.LockResource() retval=003c7fc0 ret=00cb4522 0024:Call user32.CreateDialogIndirectParamA(003c0000,003c7fc0,0002007e,00cb246e,00d26890) ret=00cb458b 0024:trace:win:GetDCEx hwnd 0x20034, hrgnClip (nil), flags 00000003 0024:trace:win:GetDCEx (0x20034,(nil),0x13): returning 0x3b4 0024:trace:win:release_dc (nil) 0x3b4 0024:trace:win:GetMonitorInfoW flags 0001, monitor (0,0)-(1920,1080), work (0,31)-(1920,1080) 0024:trace:win:MonitorFromRect (-3,-22)-(501,357) flags 1 returning 0x1 0024:trace:win:GetMonitorInfoW flags 0001, monitor (0,0)-(1920,1080), work (0,31)-(1920,1080) 0024:trace:win:WIN_CreateWindowEx "InstallShield Wizard" #8002 ex=00010001 style=80c800c4 0,31 504x379 parent=0x2007e menu=(nil) inst=0x3c0000 params=(nil) ... 0024:trace:win:WIN_CreateWindowEx "&Next >" L"Button" ex=00000004 style=50010001 323,319 75x23 parent=0x400a4 menu=0x1 inst=0x3c0000 params=(nil) 0024:trace:win:dump_window_styles style: WS_CHILD WS_VISIBLE WS_TABSTOP 00000001 0024:trace:win:dump_window_styles exstyle: WS_EX_NOPARENTNOTIFY ... 0024:trace:win:WIN_CreateWindowEx hwnd 0x40098 cs 323,319 75x23 ... 0024:Call user32.EnableWindow(00040098,00000001) ret=10073dfe 0024:trace:win:EnableWindow ( 0x40098, 1 ) 0024:Ret user32.EnableWindow() retval=00000000 ret=10073 --- snip ---
Later the "Next" button gets disabled:
--- snip --- ... 0024:Call user32.EnableWindow(00040098,00000000) ret=10073dfe 0024:trace:win:EnableWindow ( 0x40098, 0 ) 0024:Call window proc 0x7ebf8137 (hwnd=0x40098,msg=WM_CANCELMODE,wp=00000000,lp=00000000) 0024:Ret window proc 0x7ebf8137 (hwnd=0x40098,msg=WM_CANCELMODE,wp=00000000,lp=00000000) retval=00000000 0024:Call window proc 0x7ebf8137 (hwnd=0x40098,msg=WM_ENABLE,wp=00000000,lp=00000000) 0024:Ret window proc 0x7ebf8137 (hwnd=0x40098,msg=WM_ENABLE,wp=00000000,lp=00000000) retval=00000000 0024:Ret user32.EnableWindow() retval=00000000 ret=10073dfe ... 0024:Call user32.EnableWindow(00040098,00000000) ret=10073dfe 0024:trace:win:EnableWindow ( 0x40098, 0 ) 0024:Ret user32.EnableWindow() retval=00000001 ret=10073dfe --- snip ---
It took a while to figure out why ... Debugging InstallScript interpreter code is nasty and should be avoided.
Thanks to an InstallShield script decompiler that worked on this version of InstallScript (setup.inx) more information could be gathered:
--- snip --- ... /* 0004F1F6: 0022 */ // -- Begin Function Code -- // /* 0004F1FF: 0006 */ s0003 = "SdCustomerInfo"; /* 0004F217: 0006 */ n0004 = 0x00002F16; /* 0004F223: 0006 */ s0006 = "<USERNAME>"; /* 0004F237: 000D */ n000E = g_number0010 == 0x00000002; /* 0004F246: 0004 */ if(! n000E) goto label_0B67; // normal if /* 0004F252: 0021 */ function_036A(g_str002E, s0003, s0000, g_number001C); /* 0004F264: 0021 */ function_0374(g_str002E, "Result", 0x00000002, s0004, n0001); /* 0004F281: 0021 */ function_0374(g_str002E, "szName", 0x00000001, s0001, n0003); /* 0004F29E: 0021 */ function_0374(g_str002E, "szCompany", 0x00000001, s0002, n0003); /* 0004F2BE: 0021 */ function_0374(g_str002E, "nvUser", 0x00000002, s0004, n0000); /* 0004F2DB: 0006 */ g_str0023 = s0001; /* 0004F2E5: 0006 */ g_str0022 = s0002; /* 0004F2EF: 0006 */ g_number0003 = n0000; ... /* 0004F764: 0021 */ function_039C(s0004, s0006, s0001, 0x00000000); /* 0004F778: 0021 */ function_01D5(s0003, 0x000003EA, s0004); /* 0004F789: 0021 */ function_039F(s0002); /* 0004F792: 0021 */ function_039F(s0001); /* 0004F79B: 0028 */ StrLengthChars(s0001); /* 0004F7A2: 0006 */ n000E = LAST_RESULT; /* 0004F7AC: 0028 */ StrLengthChars(s0002); /* 0004F7B3: 0006 */ n000F = LAST_RESULT; /* 0004F7BD: 0019 */ n000E = n000E && n000F; /* 0004F7CA: 0020 */ USER.EnableWindow(n000A, n000E); ... --- snip ---
The dialog template for "SdCustomerInformation" contains static "Company" and "Name" controls with corresponding edit fields. They are created from template and are usually visible to the user for input.
One can use "Resource Hacker" tool and open "_isuser_0x0409.dll" (res id: 2f16 -> Dialog 12054 -> 1033) to inspect the dialog template/properties. Also "Winspector" Window/Message spy tool shows these controls at runtime (use "highlight" feature).
The string length values from both edit controls would be used to control the activation of "next" button (see decompiled script snippet)
In this case these controls are invisible by default hence no user input is possible (WS_VISIBLE missing in template).
Instead InstallShield builtin properties are used to fill internal "szCompany" and "szName" variables.
IFX_PRODUCT_REGISTEREDCOMPANY -> http://helpnet.flexerasoftware.com/robo/projects/installshield17langref/ifx_...
IFX_PRODUCT_REGISTEREDOWNER -> http://helpnet.flexerasoftware.com/robo/projects/installshield17langref/ifx_...
Armed with that information: winecfg -> "about" -> "Windows registration information" -> fill "Owner" / "Organisation".
Et voilà. ;-)
I suggest to add this information to appdb entriy of "OrCAD": http://appdb.winehq.org/objectManager.php?sClass=version&iId=18131
Move along, there's nothing to fix here ...
Regards