I have a question:

How can I access a Windows system variable from within my application? For example, if I want to store my help file in the Windows folder (the variable "windir", how to I tell my program that? I could also just put the help file in the same folder as the application, but since the user will be able to specify a custom installation location, how can I cause the program to retrieve the path the user selected?
I know I need to set the HelpProvider namespace property to the location of the help file, but I won't know the location at design time and I don't know how to have that location stored in a variable.

String s = Environment.GetEnvironmentVariable("windir");

Awesome! Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.