BobSakemano
Technical User
I need a script that does the following things:
Dismount Exchange Information Stores
Run Eseutil /d
Mount Exchange Information Store
So far I’ve been working with send key commands in my script:
Option Explicit
Dim objShell, Racey, Count
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd"
If 1 = 1 then
objShell.SendKeys "net stop Microsoft Exchange Information Store"
objShell.SendKeys "{ENTER}"
objShell.SendKeys "cd c:\program~1\ Exchsrvr\bin\"
objShell.SendKeys "{ENTER}"
objShell.SendKeys "eseutil \d c:\program~1\ Exchsrvr\MDBDATA\priv1.edb"
objShell.SendKeys "{ENTER}"
end if
This doesn’t work ofcourse because the Net Stop command is wrong, it should be "net stop "Microsoft Exchange Information Store"" (with double quotes on the service).
But the vbs doesn’t like this and gives me an error: Expected End Statement.
Can you guys help me with this, I’m sure there is a much easier way.