How to run my program on before logout on windows XP?

Dennis C picture Dennis C · Nov 27, 2008 · Viewed 17.9k times · Source

I am looking for an inverse version of "RunOnceEx".

RunOnceEx does run some program, before the user's shell(desktop&taskbar) start. The login progress will not continue before the runonceex complete.

I want to do exact the same but on user logout. When she/he logout, all running program shutdown, leaving shell(desktop&taskbar), then ""I wish my program will be execute this moment"", finally logout.

I think it is possible because the "mobsync.exe" is doing that. But I cannot find where and how to do it.

Answer

VonC picture VonC · Nov 27, 2008

Warning, as said here, gpedit.msc will allow you to configure a logoff script for all users.

If you need that script only for one user, you need to declare it directly in the registry, both in HKCU and HKLM.