First post, by Cosmin
Hello all!
I am trying to create a batch file that run DOSBox.exe, and then send input keys (such that dosbox will think that I pressed a certain key). I created it and it works perfectly with notepad.exe.
My problem is that when I go to change the pathname to open DOSBox.exe instead of notepad.exe, it gives me an error:
ERROR: Cannot find the specified file
ERROR CODE: 80070002
Here the code:
(echo with createobject^("wscript.shell"^)
echo .run "C:\Program Files (x86)\DOSBox-0.74-3\DOSBox.exe" <-------------if i change this with "notepad.exe", it works
echo wscript.sleep 2000
echo .sendkeys "MOUNT D: D:\"
echo .sendkeys "{enter}"
echo wscript.sleep 1000
echo .sendkeys "D:"
echo .sendkeys "{enter}"
echo .sendkeys "DIR"
echo wscript.sleep 1000
echo .sendkeys "%%{F4}"
echo end with) > %temp%\sk.vbs
start /w %temp%\sk.vbs