Chapter 11. Windows systems integration 345
5. Reboot the computer. If everything was set up correctly, the AutoExNt.bat file
will be executed automatically by the Service Control Manager when the
computer boots. There is no need to log into the computer for the
AutoExNt.bat file to execute, because it runs as a system service.
11.8 Disabling auto disconnect
The auto disconnect feature disconnects a network drive after a time period of
inactivity on the network drive. This is not a favorable environment to have a
drive disconnect after a time period of inactivity if a data base or application
server is running in the back ground.
The LAN Auto disconnect parameter is in the registry under the subtree:
HKEY_LOCAL_MACHINE under the subkey:
Note that in the registry, you cannot disable the Auto disconnect parameter. This
can only be done at a command line.
Note: The sleep xx command above specifies a waiting period in seconds to
do nothing, which ensures that the service has enough time to find and log
into the target. It is also used between the net stop and net start, because
sometimes the server service will crash if you stop it and then immediately
restart it. The Browser service is also involved in this case, because it is
dependent on the server service.
Tip: The drive does not have to be specified. A file on a specific drive can also
be selected to prevent the services from starting in the case where a new
drive was added and a wrong drive letter was allocated; add the file name to
the command line:
if exist h:\file.txt goto....
This can be any file, even an executable or database file, because this part of
the script just checks for the availability of the file, it does not open or launch
Tip: For more information the article is available in the Microsoft Knowledge
Base Article 138365.