One of these tools, the AutoExNT Service, runs a batch file named autoexnt.bat without you having to log onto the system. To run a batch file automatically at startup (to map drives, install printers, copy files or start an application), you'd typically use the Windows Startup folder, logon scripts or Scheduled Tasks. These are all viable options that will handle most of your startup needs.
But what if your batch file or task needs to start in a certain order (because it is dependent on another process, service or application), and you want it to run before you have to log onto the system? This is where AutoExNT comes into play.
Installation of AutoExNT
- Using a text editor such as Notepad, create a batch file named Autoexnt.bat. Include the commands you want to run at startup in this file, such as copy files or start an application.
- Copy the Autoexnt.bat file you just created, the Autoexnt.exe, Servmess.dll and Instexnt.exe files (in the Resource Kit) into the %SystemRoot%\System32 folder on your computer.
- To install the service, open a command console and type: instexnt install.
Use of AutoExNT
- To test AutoExNT, open a command console and type the command net start autoexnt. You should see Autoexnt.bat file execute.
- Configure your service options by clicking Start-->Program Files-->Administrative Tools-->Computer Management-->Expand Services and Applications -->click Services. Double-click the AutoExNT service
- Select Automatic in the Startup type box.
- Use the Logon As property if your autoexnt.bat file requires specific privileges to run its commands.
- If necessary, set any dependencies that AutoExNT should wait for before starting. This is handy if your application or task requires another service, such as the Workstation service, to be running before it can execute.
There is one issue with AutoExNT: It does not normally work well with applications that have interactive consoles.
About the author: Tim Fenner (MCSE, MCSA: Messaging, Network+ and A+) is a senior systems administrator who oversees a Microsoft Windows, Exchange and Office environment. He is also an independent consultant who specializes in the design, implementation and management of Windows networks.
This was first published in August 2007