how obtain the executable directory of a window service

  • Thread starter Thread starter Willie wjb
  • Start date Start date
W

Willie wjb

Hi,

i created a windows service. This service is installed in some c:\program
files\x directory
when started it needs the directory in which it is started.

when i use the system.environment.currentdirectory i get the
C:\WINNT\SYSTEM32 in stead of the
c:\program files\x.

i think the windows service is started by another program out of the
system32 dir.
Is there a (simple) way to get the c:\program files\x direcotry where the
executable is located.

thanks.
 
Back
Top