I am going crazy trying to sort out this issue. I have a bat file that maps two network drives and then executes a vbs file (contents in code section). It runs correctly from the command line but as a scheduled task it doesn't do anything. Is say it completed successfully with code 0x0 but it didn't do what it was supposed to do.
I have "Run with highest privileges" checked. I'm logged in as an administrator and I have the task scheduled to run with an administrator account.
net use H: \\wvdl1\wvdl-m\
net use Y: \\wvdl8\D$
cscript /nologo G:\BSEtoNAHLNonHK.vbs