Finding Framework directory from code

D

Damian R.

I am writing a console application which is to act as a
tool within a larger application. The console application
would basically install a windows service that I call an
Agent.
As part of the install of the Agent I need to install the
Windows service into the system. I have 2 questions:

1) Is there a class that I can use to do the neccessary
registration, i.e. I can just call some sort of service
install method on a class?

2) If there is no such class, is there a way I can find
out from within code the path to the installutil.exe
program is?
 
R

Rajasi Saha

One way to get the path to installutil.exe is to read the value of registry
key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" and
append the version (got from Environment.Version) to it.

rajasi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top