Home All Groups Group Topic Archive Search About

How to get full path for "Program Files" folder?

Author
26 Aug 2006 12:00 AM
pedestrian via DotNetMonster.com
I'm using VB 2005. How to get the full path for "Program Files" folder in
Windows,
ie. either it is C:\Program Files or D:\Program Files or etc.?

How about the full path of "Windows" folder? (either C:\Windows or C:\WINNT
etc.)

Thanks for replying...

--
Regards,
Pedestrian, Penang.

Message posted via http://www.dotnetmonster.com

Author
26 Aug 2006 12:24 AM
Herfried K. Wagner [MVP]
"pedestrian via DotNetMonster.com" <u16758@uwe> schrieb:
> I'm using VB 2005. How to get the full path for "Program Files" folder in
> Windows,
> ie. either it is C:\Program Files or D:\Program Files or etc.?
>
> How about the full path of "Windows" folder? (either C:\Windows or
> C:\WINNT
> etc.)

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/msg/7ab94ed877bbf187>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
26 Aug 2006 12:38 AM
Tom Shelton
pedestrian via DotNetMonster.com wrote:
> I'm using VB 2005. How to get the full path for "Program Files" folder in
> Windows,
> ie. either it is C:\Program Files or D:\Program Files or etc.?
>

Console.WriteLine( _

System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles))

--
Tom Shelton
Author
26 Aug 2006 5:50 AM
pedestrian via DotNetMonster.com
Thanks to both of you, Herfried and Tom...

--
Regards,
Pedestrian, Penang.

Message posted via http://www.dotnetmonster.com