I'm trying to get a batch file to run from start up through the registry. I am running a looping batch file that is hidden with a vbs file. I'm not the most knowledgeable when it comes to this type of coding so I had to run a batch file (launch.bat) that then runs a vbs file (invis.vbs) which hides another batch file wile it runs. I think that I have the registry portion figured out but when I boot up I get an error message saying that the vbs file can't find the batch file that I wish to run. This is puzzling because the whole thing works just fine if I initiate it manually.
The file that is supposed to run after all this is repeat.bat. Like I said, if I run the launch.bat file the whole thing works just fine, but when I tell the registry to run it at start up the vsb portion of the chain does not work.
and just in case I screwed up the registry part hear is the portion of the registry containing the start up info in question
Question
zimbra
I'm trying to get a batch file to run from start up through the registry. I am running a looping batch file that is hidden with a vbs file. I'm not the most knowledgeable when it comes to this type of coding so I had to run a batch file (launch.bat) that then runs a vbs file (invis.vbs) which hides another batch file wile it runs. I think that I have the registry portion figured out but when I boot up I get an error message saying that the vbs file can't find the batch file that I wish to run. This is puzzling because the whole thing works just fine if I initiate it manually.
the files look like this:
launch.bat-
wscript.exe "F:\path\invis.vbs" "repeat.bat"
invis.vbs-
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
The file that is supposed to run after all this is repeat.bat. Like I said, if I run the launch.bat file the whole thing works just fine, but when I tell the registry to run it at start up the vsb portion of the chain does not work.
and just in case I screwed up the registry part hear is the portion of the registry containing the start up info in question
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"application"="\"F:\\path\\launch.bat\""
any help?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts