Showing posts from April, 2009

Add, remove, update, query Windows Services from command line

Windows ‘sc’ command can be used to manipulate Windows Services. More info can be found on Microsoft TechNet

Change current directory for Windows Service to application directory

By default current directory for Windows Service is c:\windows\System32 To change it to point to your application directory execute the following in the initialization section of your windows service Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);