otya128 / winevdm

16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows
GNU General Public License v2.0
2.64k stars 150 forks source link

InstallShield hanging #226

Open d00nicus opened 5 years ago

d00nicus commented 5 years ago

Attempting to install multiple programs that use the old InstallShield (that requires a 16 bit stub) results in the messages below, and a frozen progress bar

version: 1070 5ca8:fixme:module:LoadModule_wine_implementation 1299: Strange error set by CreateProcess: 740 04fc:err:file:RedirectDriveRoot 166: c:\stopthis.now => C:\otvdm\c\stopthis.now

After the CreateProcess error, a UAC elevation prompt appears, and once acknowledged, the second error will appear (sometimes multiple times depending on the version of InstallShield.

(X-Wing vs TIE Fighter, or A-10 Cuba! are two of the programs I've seen this with so far, but I'd expect any InstallShield installer of the same age to behave the same as it was pretty standardised)

skipnyip commented 4 years ago

This issue appears to still be present in V0.7.0

version: 1056
6414:fixme:module:LoadModule_wine_implementation 1299: Strange error set by CreateProcess: 740
11d8:err:file:RedirectDriveRoot 166: c:\stopthis.now => C:\OTVDM-~1\c\stopthis.now
11d8:err:file:RedirectDriveRoot 166: c:\stopthis.now => C:\OTVDM-~1\c\stopthis.now
cracyc commented 4 years ago

Get the newest build from https://ci.appveyor.com/api/buildjobs/n4nw6xv4ct136wxv/artifacts/otvdm-master-1552.zip

skipnyip commented 4 years ago

cracyc,

Thanks for the updated version. I gave it a shot, but it appears the issue is still present. Thanks.

version: 1552
019c:err:file:RedirectDriveRoot 166: C:\AUTOEXEC.BAT => C:\OTVDM-~2\C\AUTOEXEC.BAT
534c:fixme:module:LoadModule_wine_implementation 1317: Strange error set by CreateProcess: 740
6a0c:err:file:RedirectDriveRoot 166: c:\stopthis.now => C:\OTVDM-~2\c\stopthis.now
6a0c:err:file:RedirectDriveRoot 166: c:\stopthis.now => C:\OTVDM-~2\c\stopthis.now
cracyc commented 4 years ago

I tried A10 cuba and the zork nemesis demo that comes with it and neither showed any problem. I'd need more info, which software causes the problem for you, your windows version, etc and a trace to attempt to solve it.

skipnyip commented 4 years ago

https://drive.google.com/open?id=1iugUzHHUr9ojL2887gCIgfjmUXMXMp4Y is the program I'm trying to run. This is on a Windows 10 Pro laptop, as well as a Windows 10 Home 1903.

\08.02\rslogix5000_v8_02_2001_06_14\ENGLISH\RSLogx5k\setup.exe and \08.02\cflash_rs5k_v8_megabundle_2001_06_14\setup.exe have similar issues.

I will admit that I don't actually know how to provide you with a trace.

Thanks

Edit:

So, on my home computer, it ended up launching, but it took quite while, and it actually launched after I had closed out of otvdm.exe. I'm looking at it closer, and this time the progress bar in the Setup is actually making progress, but seems to chunk every time a new stopthis.now message is displayed. Let me try this again on my pro computer, but it will be after Wednesday.

Thanks again.

cracyc commented 4 years ago

Strange. For me it goes quickly and only shows the message once. The cflash installer prints a error after the 32bit part run another 16bit program unelevated so it doesn't work properly but the program does install, don't know if it works. The rslogix installer prints a lot of dll errors but it's a 32bit dll so there's nothing that winevdm can do about it. To do a trace "set WINEDEBUG=+relay" then run otvdm.exe from the command line. It's very verbose so you'll want to redirect stderr with "2> out.txt".

OldClassicGamer commented 4 years ago

I have exact same problem.

cracyc commented 4 years ago

Again, need a trace.

OldClassicGamer commented 4 years ago

How to provide a trace? The above description "set WINEDEBUG=+relay" then run otvdm.exe from the command line does not help me as I still don't understand how to do it. Any chance you can post some tutorial with screenshots?

agreatwizard commented 3 years ago

I am getting the same error trying to install Autocad 14.

Piotr333 commented 3 years ago

I had the same. The solution is. Run cmd.exe as administrator. cmd.exe is located in C: \Windows\System32\ Write if it solved the problem.

slapshot2213 commented 3 years ago

I am getting the same error trying to install SimTower.

cracyc commented 3 years ago

Again, i can't reproduce this. It can't get fixed without a detailed trace.

OldClassicGamer commented 3 years ago

Again, I can't reproduce this. It can't get fixed without a detailed trace.

And you still did not tell me how can I provide a detailed trace? I asked this back on September 30 2020 and you ignored me. How am I supposed to provide a detailed trace when I don't know how to do it? This is clearly a widespread problem that is happening to multiple people and you don't tell us how to provide detailed trace. Sorry if I sound rude but I think it's rather unprofessional to ignore instead of guiding others on how to provide this detailed trace that you need in order to tell us how to fix it...

cracyc commented 3 years ago

It's described in the issue template which are the steps to take before reporting a bug. https://github.com/otya128/winevdm/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

OldClassicGamer commented 3 years ago

It's described in the issue template which are the steps to take before reporting a bug. https://github.com/otya128/winevdm/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

And I did check that and here is what I responded last year about it:

"How to provide a trace? The above description "set WINEDEBUG=+relay" then run otvdm.exe from the command line does not help me as I still don't understand how to do it. Any chance you can post some tutorial with screenshots?"

The issue template on that page is confusing and many people don't understand what to do. Please provide detailed screenshots with an explaination.

danemtsov commented 3 years ago

General note: It wouldn't harm to know essentials like e.g. how to work with a command prompt, a bit of batch etc. before messing with system internals like smuggling in a 16bit Windows layer. Then the description in the issue template should be detailed enough.

But in case you've never worked with a command prompt/shell window before:

  1. Run the command prompt.

✏️ Press Win + R, type "cmd" then press Enter ... or just search for it.

1.5. You might want to change the current directory of the command prompt. Type

cd *path-to-new-directory*

into the command prompt and hit Enter. Note: Paths that contain spaces must be enclosed in " ".

  1. Set the environment variable:
    set WINEDEBUG=+all,-snoop,-ldt,-fixup,-module,-global,-local,-disasm,-syslevel,-thunk

✏️ This is what you type (or just paste) into your command prompt. Hit Enter. Basically this environment variable tells winevdm which events should be logged. Apparently for this issue you need

set WINEDEBUG=+relay

instead as crayc wrote in an earlier comment.

3.

*old-executable-file* 2> trace.txt

✏️ Run your old executable: Insert the path to the 16bit exe you're trying to run. 2> trace.txt will redirect the standard error stream to the file trace.txt in the current directory of your command prompt.

3.5. After your're done running the exe you can open Windows Explorer in the current directory with

explorer .
  1. Upload trace.txt here.

... just drag the trace file into the attachment area below the GitHub comment box. Or use a link to Dropbox or the like since these trace files can get quite big.

Zero3K commented 2 years ago

Here's the requested trace.txt made using v0.8.1 of otvdm:

trace.txt

Mysteli commented 2 years ago

I have almost the exact same error on another InstallShield. otvdm v0.8.1 Installer file year: mid-1997

Here is the trace for it if it helps: trace-2.txt

robrich82 commented 2 years ago

I'm also getting this problem in several InstallShield setup instances, I've done a trace which I've attached. Using the 2293 build.

trace.txt

cracyc commented 2 years ago

This one is different. The other traces show winexec returning immediately which I can't explain or reproduce but @robrich82, yours shows that the elevation prompt should be shown. Are you getting an elevation prompt.

robrich82 commented 2 years ago

I couldn't remember if I saw the prompt or not, I've re-run it and I definitely saw the prompt and chose yes. Attached is the new trace: trace2.txt

cracyc commented 2 years ago

What are you trying to install?

robrich82 commented 2 years ago

In this case Simcity. I've had it before though with some other installshield instances. It shows the loading bar then it stops, then eventually just closes itself.

cracyc commented 2 years ago

Problem is the trace doesn't show anything wrong. The 16bit stub shows the elevation prompt which then runs the 32bit installer. Whatever is causing the problem is in the 32bit part and thus isn't in the trace. Someone who has this problem and knows how to use windbg well is probably going to be needed to solve it.

cracyc commented 2 years ago

Try https://ci.appveyor.com/project/otya128/winevdm/builds/43498345/job/nowhj5fygqxx7w63/artifacts which will print a bit more logging.

robrich82 commented 2 years ago

Here is the trace, it seems to be something on my machine blocking it though. If I restart with nothing in start-up and turn off non-Microsoft services it works as expected. I then tried doing it one by one, but each time it started working when I turned a different thing off, i.e. one time it was the Nvidia services, another time Razer, another time Asus. I am baffled why they are blocking things, but yeah it doesn't seem to be an issue with otvdm.

trace3.txt

cracyc commented 2 years ago

Procexp https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer would probably be the easiest ways to solve this, easy being relative, you'd still need a decent understanding of win32.

OldClassicGamer commented 2 years ago

Here is the trace, it seems to be something on my machine blocking it though. If I restart with nothing in start-up and turn off non-Microsoft services it works as expected. I then tried doing it one by one, but each time it started working when I turned a different thing off, i.e. one time it was the Nvidia services, another time Razer, another time Asus. I am baffled why they are blocking things, but yeah it doesn't seem to be an issue with otvdm.

trace3.txt

I confirm when I had a hanging issue, something about NVIDIA services was a problem because when I tried to run one installer, it just hanged but when I decided to just keep on waiting, I eventually clicked to update the NVIDIA driver and during the update process of NVIDIA driver, the installer using winevdm resumed and ended up working. After that one time, it went back to non-working. So something NVIDIA-related is definitely a problem.

DoubleF3lix commented 2 years ago

I'm also having this issue. It gets stuck at 45% and sometimes I get spammed with be60:err:file:RedirectDriveRoot c:\stopthis.now => D:\Documents\otvdm-v0.8.1\c\stopthis.now in the console

jakopo87 commented 2 years ago

Using "Analyze Wait Chain" on the process in the Details tab of the Task Manager may show who is causing the installer to hang.

DoubleF3lix commented 2 years ago
otvdm.exe (PID: 55564) Thread: 72356
  _INS0432._MP (PID: 42136) Thread: -

I also get these errors:

b4f4:err:winevdm:set_peb_compatible_flag user32.dll has already been loaded. (Anti-virus software may be the cause.)
b4f4:err:winevdm:set_peb_compatible_flag Some compatibility flags can not be applied.
version: 2161
fb68:err:task:cwd_warning could not get 8.3 filename. D:\Downloads\life
fb68:fixme:module:LoadModule_wine_implementation Strange error set by CreateProcess: 740
11aa4:err:task:cwd_warning could not get 8.3 filename. D:\Downloads\life
6928:err:task:cwd_warning could not get 8.3 filename. D:\Downloads\life
6928:err:file:RedirectDriveRoot c:\stopthis.now => D:\Documents\otvdm-v0.8.1\c\stopthis.now

Where the bottom one keeps repeating

cracyc commented 2 years ago
_INS0432._MP (PID: 42136) Thread: -

This is a win32 process so otvdm is waiting on something out of it's control.

6928:err:task:cwd_warning could not get 8.3 filename. D:\Downloads\life

Winevdm can't properly work on files in a directory without an 8.3 filename.

cracyc commented 2 years ago

I was able to half-repo this by running the simcity 2000 installer while a program was paused in the debugger. Installshield is calling SendMessageA with a -1 hwnd which sends a broadcast message to all windows. If there is a window that is not handling messages properly the win32 part of the installer will hang, this only applies for installers which show the elevation prompt. There's nothing that winevdm can do to fix this particular problem since the issue is in win32.

PenguinIsrael commented 9 months ago

my fix was to uninstall otvdm (cancel the registry edit) and run Winevdmw as administrator (without installing otvdm)

I tried running Timmy's sea Advernture but otvdm couldn't have the rights to install (i guess), and i couldn't run the installation as administartor, canceling the registry key and just using winevdmw as administartor fixed it. Thanks!

virtualflesh commented 8 months ago

otvdm.exe worked flawlessly for me. An install shield application was exhibiting the stalling behavior expressed above, though the install shield application window was responsive, somewhere around 40% the install shield was stalled. I enabled application tracing as described above, but the trace file clearly showed nothing wrong with otvdm.exe. The root cause, which had nothing to do with otvdm.exe, was a conflict between the install shield application and an unrelated running service. I recommend closing as many Windows services as possible before using otvdm.exe. I solved this problem on Windows 10 by exiting the Steam and Epic Games Launcher services. Utilizing the Task Manager process details, I right-clicked on the stalled install shield application and selected "Analyze wait chain". The 16-bit installer was waiting on MagnetEngine.exe (a Steam service) which was also tied into the EpicGamesLauncher.exe, a separate game portal service. Not sure of their dependency, but closing both permitted the install shield to complete. your mileage may vary.

cracyc commented 8 months ago

I wrote installshieldfix to fix a problem where the win32 part of installshield calls SendMessage(HWND_BROADCAST) and some other window fails to pump it's message queue causing a hang. That might be the same problem that you are seeing.

robrich82 commented 8 months ago

How does installshieldfix work? Do you just run it if it hangs?

cracyc commented 8 months ago

Get https://github.com/cracyc/installshieldfix/releases/tag/v1.1 then unzip it to your winevdm directory. Uncomment "ElevationShim=isfixload.exe" in otvdm.ini but change it to include the full path to isfixload.exe.

LordGlarthir commented 8 months ago

Get https://github.com/cracyc/installshieldfix/releases/tag/v1.1 then unzip it to your winevdm directory. Uncomment "ElevationShim=isfixload.exe" in otvdm.ini but change it to include the full path to isfixload.exe.

I get 2 virus detection warnings by downloading this :O

emendelson commented 8 months ago

Half the malware vendors flag as malicious anything that goes deep into the OS the way this does. You have to decide for yourself whether it's likely that anything posted on this page is actually dangerous. (Hint: it isn't.)

JohanLeirnes commented 2 months ago

https://github.com/otya128/winevdm/issues/226#issuecomment-1132455298 This helped me, for me it was overwolf on my pc that hanged the app

ZaDarkSide commented 1 day ago

Get https://github.com/cracyc/installshieldfix/releases/tag/v1.1 then unzip it to your winevdm directory. Uncomment "ElevationShim=isfixload.exe" in otvdm.ini but change it to include the full path to isfixload.exe.

I can confirm this is working for InstallShield Wizard Setup.exe it should be included by default in otvdm if you ask me