Help to finalize the script
var Process = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("Select * from Win32_Process Where Name = 'notepad.exe'");
if ( Process.Count < 1 )
{
new ActiveXObject("WScript.Shell").Exec("notepad.exe");
}
In this script it checks if the process is running Notepad , if not then starts.
The question how to specify the path correctly? need for example way C:\\123\\1.bat that would be checked running or not.
Tell me how the correct way to specify