0

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!

Technologuy
  • 131
  • 3
  • 16

1 Answers1

2
Environment.GetFolderPath( Environment.SpecialFolder.ProgramFiles)

SpecialFolder enumeration on MSDN

Sam Axe
  • 33,313
  • 9
  • 55
  • 89
  • 1
    Thank'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