On a windows operating we can create our windows service with the exe file developed on our own either in vb or c# or etc. or any other executable windows component or any other third party software. When coming to the Development Softwares like Visual Studio 2003 and Visual Studio 2005 or the higher version we can create a window service as a package. But in Visual Basic 6 we can create an executable form of our package but we cannot install the executable file as a windows service which may be developed for a sole purpose as a windows service.
This was available since 1996 and the thing is that we can make any old VB6 exe a service without changing anything in the code. The Windows NT Resource Kit provides two utilities that allow you to create a Windows NT user-defined service for Windows NT applications and some 16-bit applications (but not for batch files). Instrsrv.exe installs and removes system services from Windows NT and Srvany.exe allows any Windows NT application to run as a service.
This kit is available to download as a zip file from Download SrvAny Kit.
- Extract the zip files to a folder and run SrvInstw.exe file (Run as Administrator if Operating System is WinNT or Win2k or WinVista) and Check Install a Service radio box, click Nex.
- Check Local Machine radio box, click Next
- Enter the name for your service, click Next
- Click Browse and select srvany.exe (which is in the same folder), then click Next
- Click Service is its own Process radio box, click Next
- Select what user account you want this service to run under. If this service is to have its UI, check the Allow Service to Interact with Desktop checkbox. Normally the services run under System Accoun.
- Select the startup option, click Next and Click Finish.
Type RegEdit.exe in Run window and
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
- Locate the service you just created in the Services branch, click on it.
- Create a new key called Parameters
- Click on Parameters and create a new string value called Application
- Double-click on Application and set its value equal to the full path of your executable (eg. c:\App1\App1.exe)
Now go to services applet and start your service which makes your executable file to run immediately or load into memory and the service will be automatically started next time you load the operating system.
Applicable to: Windows 98, Windows XP, Windows NT, Windows 2000, Windows 2003, Windows Vista
Recent Comments