Re: Run batch file at shutdown?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Torgeir Bakken (MVP) (Torgeir.Bakken-spam_at_hydro.com)
Date: 02/27/04


Date: Fri, 27 Feb 2004 05:17:27 +0100

Vance Green wrote:

> Didn't find any info on whether or not
> this is possible in the MSKB...

Hi

For Win2k/WinXP Pro, this can be done by using a Group Policy Computer
(GPO) Configuration Logoff and/or Shutdown script. The GPO can be
activated manually with gpedit.msc even if you are not in a domain.

>From the Start menu Run dialog, open: gpedit.msc

for logoff script, under "User Configuration",
open Windows Settings\Scripts (Logon/Logoff)
(double click, Add...).

for shutdown script, under "Computer Configuration",
open Windows Settings\Scripts (Startup/Shutdown)
(double click, Add...).

More info in Tip 2147 in the 'NT Reg Hacks' at http://www.jsiinc.com

JSI Tip 2147. Windows 2000 Startup/Shutdown, Logon/Logoff scripts?
http://www.jsiinc.com/sube/tip2100/rh2147.htm

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Relevant Pages

  • Re: Script is not working?
    ... think I should try the Comp Config Startup script? ... You should not adding the script to Comp config startup/shutdown script ... user configuration and not the computer configuration. ... you will come to know the exact error when script is executed using GPO. ...
    (microsoft.public.scripting.vbscript)
  • Re: WMI missing security settings
    ... the rsop shows the finally result view ... every effective GPO, it will be hidden in the rsop view. ... ffWhenHourExpire) are shown with the script is because they are configured ... if setting the "Computer Configuration -> Windows Settings ...
    (microsoft.public.platformsdk.security)
  • help with a home network jumpstart
    ... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ...
    (SunManagers)
  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)
  • Re: (hopefully perl) API to /etc/network/interfaces?
    ... like to edit a 4in6 tunnel endpoint and reconfigure the interface. ... there's no desire for added abstractions to configuration files. ... alter network settings based on CGI scripts from Apache. ... I don't see how a pre-up script can ...
    (Debian-User)