BleepingComputer.com: Run VBScript on logoff? Server 2008

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Run VBScript on logoff? Server 2008

#1 User is offline   mattbirk 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 89
  • Joined: 26-October 09
  • Gender:Male
  • Location:Belleville, IL

Posted 23 November 2011 - 07:00 PM

I have been trying to run a VBScript on logoff, it is to run SyncToy 2.1 to backup their PST file to their network drive. The script works just fine, when I double click it when I am logged in it does what it's supposed to do, but just cannot get it to run and I have it setup in Group Policy, but I guess not correctly. In Group Policy Management, I set the default domain policy by going to User Policies>Windows Settings>Scripts(Logon/logoff) and pointed it to the VBScript. I tried without adding anything for the parameters when asked, and also added the -R parameter since that is run in the script, but no luck. I have also added domain users to the security filers to the GPO applies to them...

Any suggestions or ideas?

EDIT: Script is below, which was downloaded from the SyncToy from Microsoft website, and like I said works fine when manually executed.

strJobName = "outlook_express"
strCommandLine = chr(34) & "c:\Program Files\SyncToy 2.1\SyncToyCmd.exe" & chr(34) & " -R" & chr(34) & strJobName
Set objWshShell = WScript.CreateObject("WScript.Shell")
objWshShell.Exec(strCommandLine)

This post has been edited by mattbirk: 23 November 2011 - 07:18 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users