I am using visual basic and Environment.GetEnvironmentVariable Method and I want to get the path of Environment.GetEnvironmentVariable(Program Files).How is that possible? *I want to use that method instead of writing (C:/ProgramFiles), because some users have Windows installed in D Drive.. I also want to get the path in textbox1.text .Thank's for help!
Asked
Active
Viewed 1,203 times
1 Answers
2
Environment.GetFolderPath( Environment.SpecialFolder.ProgramFiles)

Sam Axe
- 33,313
- 9
- 55
- 89
-
1Thank's for your answer.But how will I change the text of textbox1? I have to something like..: textbox1.text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) right? – Technologuy Aug 30 '15 at 08:07