How to know the windows directory in vb.net

sudhanshu22

Member
Joined
Nov 8, 2006
Messages
20
Programming Experience
Beginner
Hi all,
In vb.net code, I want to know the windows directory, say if windows is
installed in d:, I would like to know
d:\windows

thanks in advance
Sudhanshu
 
Apparently there is nothing special with that folder, but you can get the special System child folder of that and go from there:
VB.NET:
Dim windir As String = IO.Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.System)).FullName
 
Back
Top