I'm setting up a single shared directory accessible to multiple servers for resources used during various scripts, \servers\share.
This directory is used for scripts including some that are scheduled using the "At system startup" trigger with the action of "\server\share\runme.exe".
This inherently fails since this directory isn't yet available, usually with the error code 2147942431, 0x8007001f, ERROR_UNHANDLED_ERROR.
Is there any quick and dirty method available to require scheduled tasks to have network connectivity before they start?
Is there any quick and dirty method available to require scheduled tasks to have network connectivity before they start?
If it truly is that the network isn't available, then yes. In the Conditions
tab on the task at the bottom check the Start only if the following network connection is available
and choose the NIC that is responsible for connectivity to those resources:
The \server\share must be available to Guest (ie, unauthenticated users) - because "Startup" tasks run as Local System. This has to be allowed via both Share permissions and NTFS permissions, of course.
Alternatively, you could distribute and run a BAT file that puts a "net use" statement before running the remote EXE, but then you're putting a plaintext password in a file. Not secure, so probably don't do that.
User contributions licensed under CC BY-SA 3.0