emendelson Posted July 2, 2024 Posted July 2, 2024 I have a script that runs the vDos.exe DOS emulator. This works perfectly on Intel machines, but on ARM systems, vDos.exe needs to have "Strict compatibility" set in its Compatibility options, available from the Properties dialog. Is there a way to set the compatibility options from an AutoIt script? I've searched the forums without finding anything.
Developers Jos Posted July 2, 2024 Developers Posted July 2, 2024 (edited) How does the command line look that shells vDos? Edited July 2, 2024 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
emendelson Posted July 2, 2024 Author Posted July 2, 2024 (edited) Like this: FileInstall("d:\dropbox\vdosinst\AutoItScripts\vdosbase.exe", $temp & "\vdos.exe", 1) If @error = 1 Then ShowError(51) $vDosTmp = ($temp & "\vdos.exe") RunWait($vDosTmp, $temp, @SW_MINIMIZE) $temp is a folder in the user's %TEMP% folder. ShowError() is a function that displays the error number. Edited July 2, 2024 by emendelson
Solution emendelson Posted July 3, 2024 Author Solution Posted July 3, 2024 I think the answer to my question is something as simple as this: RegWrite("HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", "C:\path\to\vdos.exe", "REG_SZ", "~ ARM64VERYSTRICTEXECUTION") Not tested in a script, but this is what I found in the Registry.
Andreik Posted July 3, 2024 Posted July 3, 2024 (edited) Did you tried this? FileInstall("d:\dropbox\vdosinst\AutoItScripts\vdosbase.exe", $temp & "\vdos.exe", 1) If @error = 1 Then ShowError(51) $vDosTmp = ($temp & "\vdos.exe") RunWait($vDosTmp & ' ~ ARM64VERYSTRICTEXECUTION', $temp, @SW_MINIMIZE) Edited July 3, 2024 by Andreik
emendelson Posted July 3, 2024 Author Posted July 3, 2024 (edited) Thank you for this. I didn't know it was even possible. It didn't work, possibly because RunWait doesn't seem to use parameters. So I tried: RunWait(@ComSpec & " /C " & $vDosTmp & ' ~ ARM64VERYSTRICTEXECUTION', $temp, @SW_MINIMIZE) But that didn't work either. The least bad thing I can think of is to write the registry entry and then delete it after running the command, in order not to clutter up the registry, but your method would be better if I could figure out how to make it work. EDIT: As far as I can tell from online sources, the command-line parameter won't have any effect. The only way to make this work seems to be through the Registry. Of course I could be wrong about this, and any information will be welcome. Edited July 4, 2024 by emendelson
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now