Categories

display the IP address using WMI

display the IP address using WMI

display the IP address using WMI

Private Sub Form_Load() ‘add a reference to the Microsoft WMI Scripting 1.2 library On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration"

Bookmark It

get windows version

get windows version

get windows version

Public Type OSVERSIONINFOEX     dwOSVersionInfoSize As Long     dwMajorVersion As Long     dwMinorVersion As Long     dwBuildNumber As Long     dwPlatformId As Long     szCSDVersion As String * 128 End Type

Public Const VER_PLATFORM_WIN32s = 0 Public Const VER_PLATFORM_WIN32_WINDOWS = 1 Public [...]

Directory exists

Directory exists

Directory exists

Private Sub Form_Load() Const ATTR_DIRECTORY = 16 If Dir$(c:\winnt

Bookmark It

Check file exists

Check if a file exists

Check file exists

Private Sub Form_Load() ‘Replace the ‘c:\autoexec.bat’ with the file you wish to find If Dir$(c:\autoexec.bat) <> Then MsgBox (The file exists) Else MsgBox (The file does not exist) End If End Sub

Bookmark It

Create a new directory

Create a new directory

Create a new directory

‘Replace c:\newdir with the directory you want to create

Private Sub Form_Load() MkDir c:\newdir End Sub

Bookmark It