TASK SCHEDULER and VBS

Get help for specific problems
Posts: 3
Joined: 20 Jun 2015

jfsegs

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?
Posts: 4
Joined: 27 Oct 2010

schildkroetewd

Hi JFS

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.

I hope this might have helped.

Cheers
Posts: 3
Joined: 20 Jun 2015

jfsegs

Thanks for the suggestion.

I was running with "highest privileges" and "run only when user logged in" checked.

I unchecked the "run with highest privileges" option, but get the same failure.

This is a pretty serious problem for me, since it prevents me from scheduling automatic back-ups.
Posts: 3
Joined: 20 Jun 2015

jfsegs

UPDATE: It now works.

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.

Thank you for your help.