Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Logoff script not running at shutdown


17 Jan 2012   #1

W7 Pro 64
 
 
Logoff script not running at shutdown

I have a script that launches Ccleaner and needs to run at shutdown. Shutdown scripts do not run within the user space as I understand, so I figured I'd use a logoff script which will run while the user is still logged in. The logoff script works when logging off as expected, but does not run when shutting down.

When you hit the shutdown button, the system first logs the user off then enters the shutdown process, so logically (in my head anyway) a logoff script should run when shutting down the system, yet it doesn't.

Does anyone here know how I can accomplish my goal of running Ccleaner (or any other app that needs to be run while logged in) when the system is shutdown? Please note that I am aware of the alternatives, but I want this to work when clicking "Shut Down", not by ending a batch file with a shutdown command and using that to shut down my system.

Thanks

My System SpecsSystem Spec
.

17 Jan 2012   #2

XP / Win7 x64 Pro
 
 

My System SpecsSystem Spec
17 Jan 2012   #3

W7 Pro 64
 
 

Figured it out...

In the batch file I was doing this:

Code:
C:
CD C:\Program Files\Ccleaner\
Ccleaner64.exe /AUTO
That ran fine as a logoff script when logging off, but would not run when shutting down, as it should have, I don't know why. But once I added "C:\Program Files\Ccleaner\" to my system path and changed the batch file to simply:

Code:
Ccleaner64.exe /AUTO
it works.
My System SpecsSystem Spec
.


Reply

 Logoff script not running at shutdown




Thread Tools



Similar help and support threads for2: Logoff script not running at shutdown
Thread Forum
Remove logoff & shutdown gpedit BUG? General Discussion
Is there a way to execute a prgm/script at user logoff/shutdown? General Discussion
Logoff script timeout? General Discussion
Logoff users with a script? General Discussion
Shutdown, LogOff, Sleep, and Hibernation Question? General Discussion
Use GP or logon/logoff script Network & Sharing
script error when running a vbs script. Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:25 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33