I run a Windows 2000 Domain logoff script that backs up Outlook mailboxes from individual computers to the server.
I have two logoff scripts, basically, one logoff.vbs that calls another backup.cmd. Logoff.vbs asks for user input and if yes, it runs backup.cmd
Easy enough except that backup.cmd doesn't run. It stops at PKZIP and then exits very quickly. I can't see what's on the screen. The script works fine when I scroll to the SYSVOL, then to my policy and click on logoff.vbs. Backup.cmd also works fine if I set it as logoff script in my domain policy and if it is not called from logoff.vbs. However, I need user input.
I spent two days trying to figure it out and I have no clue.
Set wshShell = WScript.CreateObject("Wscript.Shell")
strInput = MsgBox("Do you want to backup your e-mail?", vbQuestion + vbYesNo, "Select Yes or No")
If strInput = 6 Then wshShell.Run("backup.cmd") ' They pressed Yes
If strInput = 7 Then WScript.Quit ' They pressed No
ECHO Backing up your email and address book to server
ECHO Archiving your file locally
CD "Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\"
PKZIP OUTLOOK.ZIP Outlook.pst
ECHO Copying file to server
COPY OUTLOOK.ZIP H:\Email\*.*