Link to home
Start Free TrialLog in
Avatar of ccsonline
ccsonline

asked on

VB Script to Sync offline folders after Network Connect runs and before sign off

I need to implement a solution for syncing offline files and folders in a script for users connecting with VPN to an SA 4000 Juniper box.  So far I have been able to launch a vb script after Network Connect establishes the connection to map drives and sync offline folders.  I used this link to initiate the sync http://msdn2.microsoft.com/en-us/library/bb787862(VS.85).aspx.  But that same vb script if run manually before disconnecting doesn't seem to sync any changes for some reason.  If I manually right-click on My Documents and choose Synchronize, then the changes are synced.   So what I need now is to find out what I need to run to force a sync again and have it run in a script that launch before sign off from Network Connect.  The current script that disconnects network drives launches after Network Connect disconnencts.
Avatar of matrixnz
matrixnz

Are you able to apply Group Policy?  This would be the easiest method? i.e.

User Configuration\Administrative Templates\Network\Offline Files
Namely
Synchronise all Offline Files when logging on
Synchronise all Offline Files before logging off

Cheers
Avatar of ccsonline

ASKER

Yes there is a GPO when users login and logoff, but that only works if they are on the network.  This issue relates to when the user is connecting with VPN.
Also forgot to mention here is a VB Script for synchronising Offline Files

http://blogs.technet.com/filecab/archive/2007/05/01/synchronizing-offline-files-from-the-command-line.aspx

Cheers
ASKER CERTIFIED SOLUTION
Avatar of johnb6767
johnb6767
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial