execution of a script at every logOFF of any user
Hi, I would like to execute a script at every logoff of any user on a PC with Windows 7 64 bits home premium. If I look at the documentation of schtasks (http://technet.microsoft.com/en-us/libr ... 10%29.aspx ), I only find MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE as ScheduleType possibilities, but no ONLOGOFF !!! (Why ? technical difficulty ? security ?) Could you please give me an alternative way to do this non implemented "schtasks /sc onlogoff" ? (or give me the address of a more appropriate forum for this question) Thanks in advance. PS: I insist on the fact that it is for a home premium version and not for a 7 pro or 2008 server version.
May 27th, 2010 1:23pm

MSMD, I know you have a windows home premium edition what means no GPO's for you. But can you try to manual set the Logoff script gpo registery keys. And see if this works. Put your test code in testscript.cmd Copy testscript.cmd to %WINDIR%\system32\GroupPolicy\User\Scripts\Logoff Add the following entries to your windows registery. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff\0\0] "Script"="testscript.cmd" "Parameters"="" "ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 Offcourse this is a not supported configuration by Microsoft. Kind Regards DFTIM me - TWiTTer: @DFTER
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 6:46pm

Thanks for your answer. You are right that the difference is that I do not have any gpedit.msc in the home premium version, so that I thought I would not be able to set any group policy, hence the supposed need to use schtasks. I will try your suggestion as soon as I will have time to do it (and made a backup of the registry ;) ).
May 27th, 2010 7:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics