Please can someone post some code on how I can detect the windows folder on the PC.
Thanks
Printable View
Please can someone post some code on how I can detect the windows folder on the PC.
Thanks
Hi,
If i understand you correctly you trying to see if the Folder exit. In this case use this code:
:DCode:Imports System.IO
Function IfExist() As Boolean
Dim dir As Directory
If dir.Exists(Path \ FolderName) = True Then
Return True
Else
Return False
End If
End Function
Just use
System.Environment.SystemDirectory()
that will return system32 within the windows directory
NICE and LITE
Or use SpecialFolder Enum .
VB Code:
Environment.GetFolderPath(Environment.SpecialFolder.System)