Hi everyone,
My company is migrating to Microsoft Exchange Server, but many of the employees still have a pop3 account. What I would like to do without user intervention is to run the vbscript listed below in a nightly push and delete any pop3 accounts and just leave Microsoft Exchange server.
My problem is, I've been unable to write code that finds the pop3 accounts and deletes them.
It is at this point in the code:
ohell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "*r"
oshell.sendkeys "{enter}"
oshell.sendkeys "*y"
oshell.sendkeys "{enter}"....
that I want to be able to identify the pop3 accounts and delete them.
As the script runs nows, it just deletes whatever account is first on the list and in many cases its the Exchange server.
Any help would be greatly appreciated..
Thank you in advance.
Dim oshell
Set oshell = CreateObject("WScript.Shell")
oshell.Run "cmd /K" & chr(34) & "C:\Program Files\Common Files\System\MSMAPI\1033\MLCFG32.CPL"&Chr(34)
oshell.Popup "TEST",1
oshell.AppActivate "Mail Setup - Outlook"
oshell.SendKeys "{enter}"
oshell.SendKeys "{TAB}"
oshell.SendKeys "*n"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "*r"
oshell.sendkeys "{enter}"
oshell.sendkeys "*y"
oshell.sendkeys "{enter}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "%{f4}"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'cmd.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
oshell.sendkeys "%{F4}
My company is migrating to Microsoft Exchange Server, but many of the employees still have a pop3 account. What I would like to do without user intervention is to run the vbscript listed below in a nightly push and delete any pop3 accounts and just leave Microsoft Exchange server.
My problem is, I've been unable to write code that finds the pop3 accounts and deletes them.
It is at this point in the code:
ohell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "*r"
oshell.sendkeys "{enter}"
oshell.sendkeys "*y"
oshell.sendkeys "{enter}"....
that I want to be able to identify the pop3 accounts and delete them.
As the script runs nows, it just deletes whatever account is first on the list and in many cases its the Exchange server.
Any help would be greatly appreciated..
Thank you in advance.
Dim oshell
Set oshell = CreateObject("WScript.Shell")
oshell.Run "cmd /K" & chr(34) & "C:\Program Files\Common Files\System\MSMAPI\1033\MLCFG32.CPL"&Chr(34)
oshell.Popup "TEST",1
oshell.AppActivate "Mail Setup - Outlook"
oshell.SendKeys "{enter}"
oshell.SendKeys "{TAB}"
oshell.SendKeys "*n"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "*r"
oshell.sendkeys "{enter}"
oshell.sendkeys "*y"
oshell.sendkeys "{enter}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{tab}"
oshell.sendkeys "{enter}"
oshell.sendkeys "%{f4}"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'cmd.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
oshell.sendkeys "%{F4}