-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't start 16-bit apps with OTVDM after uninstalling NTVDMx64 (As well as a few other issues) #95
Comments
There was a bug in the uninstaller leaving the loader intact after uninstallation which was fixed in 7f12eff The loader should be compatible with OTVDM and give it precedence on 16bit Windows applications,if it is installed. Out of interest, which errors did you get? It runs flawlessly here, so I wonder what problems occured on your machine. Did they occur in ntvdm.exe directly? |
Well, to be honest, I can't remember what these errors exactly say, but I do remember that they give a different error code every single time, and my 16-bit apps as well as my DOS apps never start. And yes, same goes for ntvdm.exe directly, I tried to directly execute it before reinstalling Windows because of a BsoD with stop code 0x0000c1, I believe that was the stop code. Since I now know how to get rid of the injection, I may actually reinstall NTVDMx64 and try to capture some of these error for you. |
Sounds like ERROR_BAD_EXE_FORMAT. May be a problem with the loader. Which Windows version and which file date of the loader? Weird, I never managed to produce a BSOD with the loader yet... Btw., 16bit support was only added recently (3 days ago), but also the old loader left 16bit apps alone so that they can be handled by otvdm (the new loader checks for the presence of OTVDM and if OTVDM is installed, it takes OTVDM, otherwise it handles it with NTVDM to not interfere with it). The loader generally logs to DebugView console, so its log output may shed some light on the issue. Generally, the injection is somewhat time critical when injecting into console processes and therefore can be a bit unrealiable sometimes (the conhost methos still turned out to be the most reliable compared to other methods), however the AppInit-injection into windowed processes should be OK. |
Thank you for your response. I was and still am on Windows 10 Build 1909. Before I reinstalled Windows, I actually had a user-made registry problem that caused Windows to reboot with no errors right whenever it finishes the boot process. I tried to do a System Restore, and this BsoD started appearing. Note that I had the same problem I have now when I did that System Restore. Because of this, I'm actually kind of scared to update Windows 10 to Build 2004. As for which version of the loader, I don't quite know, I fetched a pre-built copy from columbia.edu. Also, where can I find the latest pre-built version of NTVDMx64? I actually want to give it another shot before I remove the injection. I honestly can't read debug logs, but if you want some, please tell me how I can send them over for you to take a look at it. |
My current test machine is Windows 10 Build 1903 (I didn't get any offers for update yet, not even to 1909... Don't know why, it says,I'm on most current release).
As for ntvdm executable and libraries, as I cannot provide them due to legal reasons, you either have to build them yourself using the minnt build instructions or wait, until columbia.edu updates their build. E. Mendelson usually updates the files within a few weeks after a new release here. To get the debug logs, just download DebugView and let it run, the loader ldntvdm should spit out some log lines that you can copy as soon as you start an application. You can copy and paste them here together with an error description (possibly screenshot). I cannot promise that I can see something from it, but we can try at least. |
Maybe you can try downloading the Windows 10 Disc Images from microsoft.com and install the latest version using them. I used their Disc Images to reinstall Windows, so yeah, maybe you can try giving it a go in a VM and try testing NTVDMx64 on it. |
Update on the situation: So, I downloaded a pre-built version of NTVDMx64 from columbia.edu (Late April build), installed it with making sure that Avast is turned off and that the Windows folder is added as an exception in Avast. I directly start ntvdm.exe a few times, it gives me some error about preparing the environment every time. Now for some ducking reason, NTVDMx64 works just fine with no errors, and OTVDM started functioning like normal again. I absolutely have no idea how I did it, but it just happened. I suspect it was all Avast's fault since it kept detecting and deleting ldntvdm.dll from pretty much everywhere it existed on my computer. So yeah, all is working.... Except for Duke Nukem 3D, setup.exe throws an error. I'll send it tommorow when I get enough sleep. |
Just to let you know: Starting ntvdm.exe directly must fail, that's not how it works. The whole loader is just there to prepare everything so that ntvdm can launch. Technically, the loader registers the next command to execute with the console host and when ntvdm.exe starts, it fetches the next command to execute from console host. Antivirus programs are a real pest, I even tried to encrypt the loader, but it didn't help against these annoying AV-programs. And when I apply for a whitelisting with an AV-vendor, the drama starts again as soon as a new loader version is compiled. Running games with NTVDMx64 won't make you very happy anyway, as the CCPU is just way too slow for an acceptable gaming experience, so I'd say you should resort to DosBox for gaming, which is highly optimized for this. |
Indeed, I faced problems with the games that actually worked. And apps as well. Sometimes any app I use (I tried EDIT and QBASIC) doesn't respond well to input, so it disregards some of the keys I press. Hope you know what I mean. As for Duke Nukem and Duke Nukem 2, they worked, but with slowdowns and no PC Speaker output, except for a long beep on Duke Nukem 2 (I use a laptop that has a PC Speaker in it). I also couldn't check Soundblaster in Duke Nukem 2's settings to get some music and sound output. Both games give me no audio output. |
Alright! So, I finally had time to log what exactly is going on when starting Duke Nukem 3D's setup program, as well as the error itself. Both of them are inside this ZIP file here. |
For music, you need to set the sound to Adlib (as stated in the readme). I never experienced any missed keystrokes, I cannot reproduce this no matter how fast I type. |
I'm deeply sorry, nevermind about the keystroke problem. I felt it while using EDIT.exe, but now that I'm adapted to how it works, I don't feel it anymore. Btw, can I somehow maximize the window of whatever DOS app I'm using and stretch its display (sorry if that's not the correct expression), or put it in fullscreen mode? |
There used to be the The other sad history part is fullscreen: This used to work on Windows versions up to Windows 8, until Microsoft enforded their new WDDM Display driver model which doesn't allow direct hardware pass-through anymore and therefore fullscreen was effectively dead. |
Hey, I had a tiny question, thanks for all the help btw. ^^ How can I benefit from your last commitment? Thank you again in advance. |
Compile it and try it out, it's not so complicated, there even is a video tutorial: You can just update the ntvdm.exe in SysWOW64 directory, if you fear that your current setup will break again by uninstalling and reinstalling. |
2020/06/02 PM 06:49 2,134,653 ntvdmx64-master.zip Building OK. |
@peter8777555 Did you test the new WOW32 part (16bit Windows support)? Would be interesting to hear if it works for you. |
I have installed WineVDM on Windows 7 X64. How to disable the WineVDM ? I do NOT want to uninstall WineVDM. I have checked below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NtVdm64\0OTVDM and set WOWTRACE=C:\log.txt |
@peter8777555 If you do not want to use the .reg scripts from otvdm for install and uninstall, which will set and remove mentioned 0OTVDM key, just rename 0OTVDM to something different. In case you have the newest ldntvdm.dll loader installed (only the newest loader supports Win16, the old one just doesn't handle Win16 applications at all), it will then start NTVDM for wow16 after a reboot (or another event that causes the loader to inject where it checks presence of OTVDM).. |
Step 1: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NtVdm64\0OTVDM rename to: Step 2 : Step 3 : Advanced INF InstallINF Install Failed。Reason: Access Deny。 OKWhat is wrong ?? Step 4 : C:\Windows\SysWOW64 2020/06/03 PM 02:59 1,418,752 ntvdm.exe OK : It can run ALL DOS program. By the way, set WOWTRACE=C:\log.txt No log.txt in C:\ |
Hm, access denied? Normally it should tell you which file or regkey it cannot install. If you still have an old loader present, please report, I might need to add a check to the install.bat then to give an option to remove the old loader code, if still present in system, as the problem may occur to all users who want to update. Not sure if Advanced Inf installer takes care of it, theoretically, it should. |
If you want to permanently ruin your chances to get otvdm working again, you may delete it. :-D Install.bat should move the wow32.dll and user.exe to a backup location after doing a takeown /f on them so that they can be replaced by the Advanced Inf installer. That's why you got "Access denied", I suppose, as takeown and move didn't work for whatever reason.
install.bat
Maybe install.bat can be modified to log the result of the commands to find out why moving these file doesn't work. I guess I need to install a fresh VM to reproduce the problem myself, or do you have an idea? What I also saw in your demo is that there are a lot of questions whether to overwrite the files in syswow64. Did you just reinstall without uninstalling (which is OK in this case), or does my uninstallation routine fail to remove these files (not a real problem, but for the sake of cleanness...)? |
I overwrite wow32.dll and user.exe to C:\Windows\SysWOW64 Run ALL Win16 programs always error File ErrorCannot find NETWORK.DRVClose(C) |
Thank you for the hint, I completely forgot to add the contents of wow2.reg to the .inf file. Of course that also didn't occur on my test VM as entries were already there. I will fix this shortly |
Yes,i am happy with WineVDM. I always I UnInstall NTVDMX64 then Install NTVDMX64. STRONG SUGGESTION: |
NTVDMX64 for DOS program. |
By the way, It can NOT work.
C:>ren/? It MUST below It can work. |
Heya! Long time no see! |
Hi, The loader just does in-memory patches, so it shouldn't "lock" a system file. To find out the reason, have you checked the windows\Windowsupdate.log protocol file to find out the exact error you are getting? Please provide a download link to a Windows update package that fails to install so that I can try to reproduce the problem. Regards |
Righty-O! Here's a link to the package I'm trying to install, just make sure you have BypassESU v7 installed properly on Windows 7 before executing the package: https://www.catalog.update.microsoft.com/Search.aspx?q=4571729 |
WU-Log.zip Here's the full WU log in case you need more information. |
Hello, @leecher1337. It seems that it's been 20 days since I last contacted you, but I didn't hear back from you about the problem yet. Could you please update me about the situation? Thanks in advance! |
I'll let you know if I find a solution to your problem. |
Thank you! I'll be waiting, good luck! But please, when you fix it, release the new update as a major one, so the version that's on columbia.edu gets updated as well. |
…ted updates that replace conhost.exe #95
YES! I've been waiting for this! Thank you so much, man! You are awesome. |
Ok, I finally found a way to build it. Though, the CMD window errored out twice about a cmdline that's not recognizable or in other words does not exist. Otherwise, everything went ok. 16-bit support works, DOS programs also work just fine, however, when I close any DOS program, NTVDM.exe just stops working every time, which is not fatal, but it's pretty annoying since an error pops up every single time. Also the F22 Demo setup graphics issue is still not fixed. |
F22 installer definitely works: The crash of the ntvdm.exe process is weird, maybe a compilation issue, as you said you had issues with compiling? Which errors did you specifically get? |
Once I reinstall the version I compiled, I'll get back to you with that specific error. Just gimme 15 minutes. |
So, these are the errors I've been getting when installing. |
Ah, ok, the error during install can be ignored, it's just a try to add an exclution for Windows Defender for the loaders. If you are using another Antivirus solution or not having Windows defender, the commands will fail, but that's no problem. Quoting readme.txt regarding old-src build:
I'm not maintaining old-src build anymore, it doesn't get tested and lacks newer patches, therefore please use MINNT build instead. MINNT is also building faster and you don't have a requirement for a Windows XP build machine. So please try MINNT build instead. |
Ah, so should I copy the minnt files in and go with bld-minnt instead of just bld while building? At least I now know that I'm kinda on the right path. |
Please read the readme:
I should add that blanks in the directory path are also a very bad idea, so I suggest you go with the suggestions of c:\WORK as build directory. |
Oh, okie, thanks. I did read the steps btw. Guess I'll just start over. |
Alright. I finally managed to build it correctly 100% this time with no errors whatsoever, the F22 demo installer issue was fixed, which indicates that everything has been done correctly. However, the Windows 7 Update issue is still present, it still fails while NTVDMx64 is installed. So yeah, good job! Many thanks for the update! 👌👌👌 |
This makes me wonder. is full screen mode possible on Windows 10 32-bit if DWM.exe is disabled? This is doable by renaming the file alongside sihost.exe, replacing with stubs (rundll32.exe works great for this purpose), enabling console login (by deleting a dll file in system32) and rebooting. Note: this breaks UWP apps |
No, it's not about some usermode goo, but it's in the kernel. There simply is no support for XPDM anymore in the kernel, only WDDM, and WDDM doesn't expose all necessary functions / IOCTLS for it, as this would be incompatible with using the GPU accelleration that Windows uses nowadays, as far as I understand. Here are some links about it: It seems that the rason for hte XPDM support in Win 7 mainly was that they could still use the classic VGA driver an starting with Windows 8, they wrote a WDDM VGA driver and therefore cut off XPDM support from kernel completely, as it was not necessary anymore in their view (leaving behind p*ssed DOS users, but as usual, they don't care). And as mentioned, you would still have the problem with the IO permission bitmap on x64 versions of Windows, which was no issue an i386 and there also is no solution for it in the kernel (even not on Windows XP x64), as x64 Windows was never meant to run NTVDM and therefore nobody had to think about a solution to this problem anyway. |
Hello! I have a Windows 10 machine and I have recently installed NTVDMx64
It kept crashing with a different error code every time, so I uninstalled it through Control Panel.
I have set my machine to start 16-bit apps with otvdm, but now that I've uninstalled NTVDMx64, this error message appears instead:
"APP PATH HERE is a 16-bit application. You don't have permission to execute 16-bit applications. Contact your system Adminstrator."
Now, I am the adminstrator, but I still couldn't find my way out of this.
Also, for some reason, ldntvdm.dll is still in System32, and injected into winlogon.exe, and I honestly want to remove the injection and delete the file to get everything back to what it was before. How can I do this?
Thanks in advance.
Regards,
David
The text was updated successfully, but these errors were encountered: