Wednesday, 15 April 2009

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);

No comments:

Post a Comment