var WindowStyle_Hidden = 0
var objShell = WScript.CreateObject("WScript.Shell")
var result = objShell.Run("cmd.exe /c checker.bat", WindowStyle_Hidden)
this is my code, (i didnt create this code, its on the internet. it works great when you double click on it, but wont compile) basically i want to use this simple java script to start a hidden batch file when the computer starts (running the .exe im trying to compile from the registry, which for some retarted reason wont run it as a .js)
the error i get from JSC (what im using to try and compile) says:
myfilename.js (3,16) : error JS1135: Variable 'WScript' has not been declared.
does anyone know either how to declare that, or compile it or even better help me with a better way to run a hidden batch from the registry when the computer starts. i want it hidden because its annoying to look at every time the computer starts.
i hope that i have provided enough enformation