I am trying to do a simple function that will call one VBScript file and run that simultaneously to the script that is currently running. I have searched online and I discovered a technique using WScript.Shell object, however since my company switched to Windows 7, it doesn't seem to work the way it did in Windows XP. I'm hoping this is some stupid issue with my code, but it keeps giving me the error:
Script_Call_tester.vbs(5, 2) (null): The system cannot find the file specified.
I did export the file path and name for the script I am trying to call, and when I paste it into the run prompt, it does find the script.
sendExports("Script_Called_tester.vbs")
function sendExports(iScript)
dim objShell
set objShell = CreateObject("WScript.Shell")
objShell.Run "\\path\" & iScript
set objShell = Nothing
wscript.echo("call worked")
wscript.sleep(3000)
end function
objShell.Run """" & "\\path\" & iScript & """"orobjShell.Run WScript.FullName & " \\path\" & iScriptor a combination... - JosefZ\\path\Script_Called_tester.vbscontains a space somewhere. The first sample from @JosefZ's comment should take care of that. Not much else we could tell you without more information. - Ansgar Wiechers\\pathrefers to non-existing host name of a server or the domain name of a domain hosting resource namedpath; not much else we could tell you without more information about real invocation of thatpathstring and it's meaning - JosefZ