Friday, 19 July 2013

Create Services from .bat file or exe file in windows 7

Create Services from .bat file or exe file

1.To create a Windows NT user-defined service, perform the following steps: 

At a MS-DOS command prompt(running CMD.EXE), type the following command:

path\INSTSRV.EXE My Service path\SRVANY.EXE

where path is the drive and directory of the Windows NT Resource Kit (i.e., C:\RESKIT) and My Service is the name of the service you are creating.

C:\Program Files\Resource Kit\Instsrv.exe Notepad C:\Program Files\Resource Kit\Srvany.exe

For Windows 7 or Windows 2008 Server download Windows Resource Kit from Microsoft site click here

After downloading ,create batch file and named as your wish and paste the below coding,

cd C:\Program Files\Windows Resource Kits\Tools
instsrv.exe 1Service "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
REG ADD HKLM\SYSTEM\CurrentControlSet\services\1Service 
REG ADD HKLM\SYSTEM\CurrentControlSet\services\1Service\Parameters /v AppDirectory /t REG_SZ /d C:\Users\Admin\Desktop
REG ADD HKLM\SYSTEM\CurrentControlSet\services\1Service\Parameters /v Application /t REG_SZ /d C:\Users\Admin\Desktop\start.bat
Save It.

1Service-My Service Name (Change your name)

C:\Users\Admin\Desktop--My batch file location(Change your location)

C:\Users\Admin\Desktop\start.bat-My batch file(Change your file)

After run the batch file your registry name added in regedit and displayed in sevices also.

check registry in windows start->run->type regedit

check services in windows start->run->services.msc

You will find your services.After that you will start the services.


Post a Comment