更新包括.prf的用户配置文件以指向新的Exchange服务器
Set oShell = CreateObject("WScript.Shell")
sRegKey = "HKCU\Identities"
' suppress error in case values does not exist
On Error Resume Next
' check for marker
sNewProfile = oShell.RegRead( sRegKey & "\NewProfile")
If sNewProfile <> "yes" Then
' Run Outlook.prf
sCmd = "\\DC\netlogon\Outlook.prf"
oShell.Run sCmd, 1, True
' create marker
oShell.RegWrite sRegKey & "\NewProfile", "yes"
End If