Getting Absolute path of windows service
-
hi I am newbie in c# windows serives. I have successfully created and install mywindows service. But I faced problem while retrieve absolute path of mywindows service, from next c# - program. how can i achieve this. Any suggestion, related links are highly grateful. Evil Inside
-
hi I am newbie in c# windows serives. I have successfully created and install mywindows service. But I faced problem while retrieve absolute path of mywindows service, from next c# - program. how can i achieve this. Any suggestion, related links are highly grateful. Evil Inside
One way to get it is by calling Environment.CommandLine
Luc Pattyn [My Articles] [Forum Guidelines]
-
One way to get it is by calling Environment.CommandLine
Luc Pattyn [My Articles] [Forum Guidelines]
-
MSDN on Environment.CommandLine states: This property provides access to the program name and any arguments specified on the command line when the current process was started. Unfortunately it also says: The program name can include path information, but is not required to do so. You may be better of using the Assembly class, maybe it is: Assembly.GetExecutingAssembly().Location :)
Luc Pattyn [My Articles] [Forum Guidelines]