Running batch file through windows service

0 comments
Prerequisite
  • Windows Resource kit.
Install resource kit to C:\RESKIT Directory

Setps to follow:
1.Open text editor and create Autoexnt.bat and include the commands you want to run at startup in this file.

2.Copy Autoexnt.bat file which you just created ,in addition to the Autoexnt.exe,Servmess.dll, and Instexnt.exe files located in the C:\RESKIT to the %SystemRoot%\System32 folder on your computer.

3.Now to install the service use following command and run them in command prompt.
instexnt install
To view the installation processes running on the desktop, use interactive switch as follow
instexnt install \interactive

You should then receive the following message:
CreateService AutoExNT SUCCESS with InterActive Flag turned OFF

NOTE: If you use the /interactive switch, any users who log on locally are able to stop the processes from running.

Testing the AutoExNT Service
To test the AutoExNT service, log on to your computer with an account that has administrator credentials, type net start autoexnt at a command prompt, and then press ENTER. The Autoexnt.bat file should run in an MS-DOS window.

To make the AutoExNT service run at startup:
Open computer management and expand services. Locate the AutoExNT serive and make it as automatic.
If you like this post, please share it!
Digg it StumbleUpon del.icio.us Google Yahoo! reddit

No Response to "Running batch file through windows service"