May 5, 2003

GetApplicationPath – Retrieving the path of a Windows application

‘ Get the path of a Windows application or an empty string if the application ‘ isn’t registered” This routine only works for those applications that register themselves under ‘ the registry key’ HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionApp Paths” You can use it to retrieve the path of all MSOffice apps, MS Access,’ SQl

ClearIEHistory – Clearing the Internet Explorer’s history

‘ Clear the IE’s HistorySub ClearIEHistory() Dim keyName As String = “SoftwareMicrosoftInternet ExplorerTypedURLs” ‘ delete the key that contains the URLs the history Microsoft.Win32.Registry.CurrentUser.DeleteSubKey(keyName, False) ‘ recreate the key, empty Microsoft.Win32.Registry.CurrentUser.CreateSubKey(keyName)End Sub

IsFontInstalled – Test whether a font name and size is supported

‘ Test whether a font name and size is supported’ Returns True if the font is supported, False otherwise” If the font is supported but the size is not, it returns the actual font size ‘ in the second argument’ If the font isn’t supported, it return the system font

EmptyRecycleBin – Empty all the files in the Recycle Bin

Shared Function _ SHEmptyRecycleBin(ByVal hWnd As Integer, ByVal pszRootPath As String, _ ByVal dwFlags As Integer) As IntegerEnd Function’ Empty all the files in the Recycle Bin.” If RootPath is a null string, it affects the Recycle Bin ‘ of all drives. You can optionally turn off confirmation dialogs, ‘

CheckWindowsUser – Check whether a username/password pair is correct

Shared Function _ LogonUser(ByVal userName As String, ByVal domain As String, _ ByVal password As String, ByVal dwLogonType As Integer, _ ByVal dwLogonProvider As Integer, ByRef phToken As Integer) As IntegerEnd Function Shared Function _ CloseHandle(ByVal hObject As Integer) As IntegerEnd Function’ Check whether a username/password pair is correct” if

ClearRunHistory – Clearing the Run history

‘ Clear the Run History’ The MRU list is kept available until Explorer is restartedSub ClearRunHistory() Dim keyName As String = “SoftwareMicrosoftWindowsCurrentVersionExplorer” _ & “RunMRU” ‘ delete the key that contains the URLs the history Microsoft.Win32.Registry.CurrentUser.DeleteSubKey(keyName, False) ‘ recreate the key, empty Microsoft.Win32.Registry.CurrentUser.CreateSubKey(keyName)End Sub