Tomcat
Tomcat

Reputation: 43

Error 80070002: The system can not find the file specified

I have two scripts one that is run as a scheduled task and then calls another script.

This works normally, i.e manually running it but I when I run it from scheduled task it can't find the path.

enter image description here

Part 1 snippet

Dim objShell
str1= "hidden\part2.vbs"
Set objShell = Wscript.CreateObject("WScript.Shell")

objShell.Run str1

Set objShell = Nothing

This works normally, i.e. it can find part2.vbs but using scheduled task it does not work.

I am trying to make an install script that will run at startup.

This doesn't work even if the file is in the same folder.

Upvotes: 0

Views: 10416

Answers (1)

MrTux
MrTux

Reputation: 34042

Make sure the current working directory is correctly set or use an absolute path.

Upvotes: 3

Related Questions