How to synchronize Local Workspace when a user logs off (sync and unlock)
Background
When using AutoManager in an environment where users can work at different workstations every day, or where multiple users share a workstation, for example in different shifts, it is preferable to automatically synchronize and unlock the contents of the Local Workspace when the user logs off.
Description
To automatically synchronize and unlock the contents of the Local Workspace when a user logs off, add the SyncUnlock executable from the ZIP file as the Logoff script in the Policy. For a single computer, that can be done in the Group Policy for that computer, which is available by using the GPEDIT.MSC command:
In an Active Directory the executable can be added as Logoff script in a similar way.
The ZIP file contains besides the SyncUnlock executable the source code, which can easily be adjusted to also delete the unlocked documents from the Local Workspace.
Update Aug 12, 2005: Newer version unlocks more intelligently (No synchronize for nested parts and some error handling for non-existing workspaces)
Update Aug 25, 2005: Using this tool might result in more nasty save dialogs when pressing save or closing the assembly although nothing is changed for the displayed (sub)assemblies. This is because the sub-assemblies on LocalWorkspace have the Read-Only (unlocked) flag when opening the main Assembly. The shown dialog can be ignored. When you start an edit on one of the subassemblies, then this document is re-locked (Read/Write) and save goes well.
Update September 29 2005: Newer version, error messages suppressed.
Update March 17 2009: Newer version attached, adapted SyncUnlock tool that waits for applications to quit before syncing. Please see the ini file in the zip for additional information.