View Single Post
  #4  
Old November 13th 20, 04:55 PM posted to microsoft.public.windowsxp.general
pyotr filipivich
external usenet poster
 
Posts: 752
Default How to add a "Shutdown" folder (the opposite of the "startup" folder) ?

"R.Wieser" on Fri, 13 Nov 2020 10:37:58 +0100
typed in microsoft.public.windowsxp.general the following:
Hello all,

I would like to have a "shutdown" folder which functions in the same way as
the "startup" folder does ("C:\Documents and Settings\{username}\Start
Menu\Programs\Startup") (read: drop a program, batch, script, etc into the
folder and it will, on shutdown, be executed).

I've been looking at adding a "logoff script" (running the contents of the
"shutdown" folder) using "gpedit.msc", but realised that I have no idea when
that one actually runs, nor that it had its own place to store its scripts
("C:\WINDOWS\system32\GroupPolicy\User\Scripts\Lo goff"). And from that
realised that it might perhaps be a good idea to see if someone knows a bit
more about this subject - before trying to recreate something that might be
build-in (but not activated) perhaps ...

Regards,
Rudy Wieser


I started with a "simple" batch file to transfer class work to and
from school. I now use it to make a back up of today's changes, with
the option to just back up, back up then goto sleep, backup and then
shut down.

if "%FTVar%"=="NapTime" GOTO NapTime
if "%FTVar%."=="Krash." GOTO Krashing
GOTO EGRESS
:NapTime
set FTVar=Egress
Echo Going to Sleep
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
REM echo call %DrvX%:\(_GoodMorning.bat
GOTO EGRess
:krashing
set FTVar=Egress
SHUTDOWN /s /t 6 /c "It's gonna blow! Head for the hills!!!"
REM GOTO EGRess
:EGRess
Echo %FTVar%
Echo Bye!

What I think you might want to do is have a "Good Night" program
which calls the programs in your "shutdown" directory.

To me, that seems simpler.

--
pyotr filipivich
Next month's Panel: Graft - Boon or blessing?
Ads