Const HKEY_LOCAL_MACHINE = &H80000002
On Error Resume Next
strKeyPath = "SOFTWARE\Clients\Mail"
strValueName = ""
Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strClientName
strKeyPath = strKeyPath & "\" & strClientName & "\Shell\Open\Command"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strCommand
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run strCommand
|