Problem solve Get help with specific problems with your technologies, process and projects.

Run your scripts without logging in

One of the most valuable (and least publicized) tools in the Win2k Resource Kit is a little service called AutoExNT.

One of the great advantages to having an application that runs as a service is that you can be sure that when the...

system boots or reboots, the service will load without any effort on your part.

However, there are many circumstasnces where you would like something to happen at boot time that cannot normally be loaded as a service. Maybe you need to run a script or batch file, a Java application, or some other type of software that is not optimized to run as a service. What you usually end up doing in these cases is logging into the system manually, running the script or application, and then locking the workstation. If a server reboots at 3am on a Sunday, then I hope you left your pager on!

Fortunately, there is an alternative. One of the most valuable (and least publicized) tools in the Win2k Resource Kit is a little service called AutoExNT. When this service is run, it looks in the system32 directory for a batch file called autoexnt.bat. It runs this batch file, then shuts itself off. Thus, you can script virtually any activity to occur on your remote server or workstation at boot time. No manual intervention is required.

There are uses for AutoExNT in circumstances other than boot time. Since it stops itself on completion, you could set this service to manual and use it as a simple trigger for complex scripts on the remote server. Just start the service remotely and the script will run. When the service stops you can do it all over again.

This was last published in December 2001

Dig Deeper on Windows Management Instrumentation (WMI) Scripting

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.