Posted On March 31, 2019

How to Convert Windows Application to Run as a Service

kimconnect 0 comments
blog.KimConnect.com >> Codes >> How to Convert Windows Application to Run as a Service

Pre-requisites:

  1. srvany.exe (from rktools)
  2. instsrv.exe

Copy srvany.exe and instsrv.exe from to c:\windows\system32 >> Run: CMD [as Administrator] >> “instsrv APP_NAME c:\windows\system32\srvany.exe” , press Enter >> Run: Regedit >> browse to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\APP_NAME >> Add Key “Parameters” >> Add string value “Application” = [Path_To_Application].exe (If application is not an executable, bat a batch file, set the value to “C:\Windows\system32\cmd.exe /k full_path_to_batch_file.bat” >> Create local user account >> Run: services.msc >> right-click APP_NAME service, Properties >> Log On tab, Enter local user account & password that has been created prior >> OK

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Recommended Skill Set of a Programmer

It's a given that a coder needs to learn how to code... like really well.…

PowerShell: Impersonation to Download Files Through Proxy

Initial Script to without impersonation # Change these values to reflect your desired downloads[string]$fileSource =…

Windows Cleanup

#Clean Up the WinSxS FolderDism.exe /online /Cleanup-Image /StartComponentCleanup#Clean Up C:\Temp Folderdel c:\temp -Recurse -Force#Cleanup Event…