Link to home
Create AccountLog in
Avatar of paulmac110
paulmac110Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Logoff script to save all open documents

Hi - Using SBS 2011 and Exchange 2010. Some of our users keep logging after after a shift without saving documents so I want to install a logoff script which will save all their open documents when logging off.

Could someone please let me know where I could find an example?

Thanks
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

I don't believe that the logoff script will run until after all the applications have closed so its not really much help.
I checked, an normal logoff script only runs after open applications have closed. I would write a small vb.net program (you can get Visual Studio Express for free) that runs when the user logs in, and then sits in the system tray. It can then catch the logoff event, and check to see which apps are open and either use "send keys" to save the documents, or just pop a message box saying to close them before shutting down.

Some explame code to catch logoffs here:-

http://www.satalketo.co.uk/vbnet-articles/vbnet-detect-windows-shutting-down-or-logging-off

but you would need to code specifically for the apps in question to add the code even to test. To save documents would be harder as it would need specific knowledge of each program.
ASKER CERTIFIED SOLUTION
Avatar of Dave
Dave
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of paulmac110

ASKER

G4ugm - Thanks for the suggestions. I will get around to trying some of those later in the week.