I'm trying to put a .bat file in my startup folder so it will run code when my computer starts up, but I don't want to see it. The batch file runs an .exe file with arguments. I was using this code in a .vbs script.

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Test\My.bat" & Chr(34), 0
Set WshShell = Nothing

When I run it, it calls the .bat file and the bat file doesn't run the .exe with the parameters. Why is this? When I run just the .bat file, it calls the .exe just fine. I would appreciate it if someone could tell me how I could edit the code to make it work.


1 Answer 1


Check out the use of the START command as illustrated in this question. The first answer in that question has more details, but here is the simple answer:

start /b "" "c:\Path\To\Your\Program.exe" -arguments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.