Skip navigation

JSI Tip 1983. When you create a network connection with the Schedule service, it is persisent until your reboot?

The Schedule service runs under the context of the SYSTEM account, unless you change it.

When you schedule a job with the AT command, any network connection you create will be available at the command prompt, and in WinFile, for every user that logs onto the target computer, until it is restarted.

The only way to remove this persistent connection, without restarting, is to use the SYSTEM account or an Administrator account to delete it.

EXAMPLE: AT hh:mm cmd /c "<Path>\batchfile.bat"

where "<Path>\batchfile.bat" contains:

@echo off
NET USE N: \\ServerName\ShareName <password> /user:<UserName>

After the scheduled batch runs, you will be able to use N: at a command prompt, even though it will not display when you issue a NET USE.

If you run WinFile (File Manager), N will be a network drive button, but the share path will be invisible.

If you don't want the above to happen, always delete the drive in the scheduled batch, using NET USE <DriveLetter:> /D.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.