Adding New Service To "services.msc"

April 7, 2006

Posted in:

Every time I had to start a program/file on the windows startup, I usually put that file in start-up folder or did some registry work in hklm\Software\Microsoft\Windows\CurrentVersion\Run or hkcu\Software\Microsoft\Windows\CurrentVersion\Run but this only worked if the user is logged on. I knew that services start without having the user logged in but I never tried starting my own. So, after spending some time googling, I was able to do so.

To start a service you need a utility called Service Installer(instsrv.exe), by default it is not included in Windows XP. You can download Windows Server 2003 Resource Kit Tools which includes this utility and many other helpful tools.

Fire up cmd, and type in C:\>instsrv your-service-name c:\path-to\file.exe

The service was successfully added!

Make sure that you go into the Control Panel and use
the Services applet to change the Account Name and
Password that this newly installed service will use
for its Security Context.

Goto run or press Win+R and fire up regedit and do the following:

Now to Start the service you either use control panel i.e., services.msc or if you are a DOS lover then you can start it by C:\>net start your-service-name

Return to blog