Get Program Files Folder in VB.Net 2005

In VB.NET 2005, when you want the program files folder (which is usually c:program files) you can use this code:

Private mstrProgramFilesPath As String= System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

Of course, there are other folders available just check out Environment.SpecialFolder

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “Get Program Files Folder in VB.Net 2005”