In Windows 7, I have a vbs script that calls ffs and runs a number of ffs batch files.
return = ffsShell.Run("""C:\Program Files\FreeFileSync\FreeFileSync.exe """ & nomen ,1,true)
nomen is a hard-coded path to a ffs_batch file.
Some of the batch files include network drives. The script works correctly on its own, but when called from Task Scheduler it fails, stating that it cannot find one of the network drives.
Task Scheduler is set to run as the same user who runs the vbs script. I have triple-checked permissions; moreover, the script does run on its own, suggesting that they are not the issue. Any ideas?
What other login option have you configured?
- Run only when user is logged on
- Run whether user is logged on or not
- Run with highest privileges
When your user is in the administrator group, the network share cannot be found if you enabled the checkbox "... highest privileges", since it behaves similar to a separate user account. You will get the same behavior if you right click the script and choose "run as administrator".
And for the option "run whether user is logged on or not": network shares are not mounted when the user is not logged in and are therefore not available.
Somewhere over the past few days, I inadvertently unchecked "run only when user logged on." When I checked "run only when user logged in", it worked in Task Scheduler.