I am writing a program to kill and restart explorer but I don\'t want to hard code the location because some people install windows in different places (for example I found some
http://msdn.microsoft.com/en-us/library/77zkk0b6.aspx
Try these:
Environment.GetEnvironmentVariable("SystemRoot") Environment.GetEnvironmentVariable("windir")