Computing Staff
  • 7

System Shutdown Script Hangs On ‘Net Use’

  • 7

I have written a shutdown script which creates a file, and then tries to run ‘net use’ to map a drive on another machine so that the file can be saved there. The script works fine from the command line, but as a script called at shutdown time by the system, it fails on the ‘net use’. Why? And is there something I can do about it?

Share

2 Answers

  1. When you shutdown the computer, the network connection is one of the first things to shutdown. You’d do better to run the script and let it do its thing, before calling the shutdown command (that you’ll add to your script). Make sure the shutdown command isn’t called until all other operations are completed.

    • 0
  2. The knowledge that the network gets shutdown first is exactly what I was looking for. I kind of figured that was the case, but wanted some assurance.
    The suggestion that I write a shutdown script is a good one – I will do that instead of trying to automate the shutdown.

    Thanks. Perfect response.

    • 0