[THIN] Re: Reboot Script?

  • From: "Gunn, Jeff" <Jeff.Gunn@xxxxxxx>
  • To: "'thin@xxxxxxxxxxxxx'" <thin@xxxxxxxxxxxxx>
  • Date: Fri, 22 Nov 2002 17:02:54 -0500

Looks pretty good.  This is what I use on my NT4.0/MF1.8 boxes (you =
have to
do a lot less with XP):

@echo off
change logon /disable
msg * This application server is shutting down for maintenance in 15
minutes.  Please log off now.
c:\wtsrv\system32\sleep 300
msg * This application server is shutting down for maintenance in 10
minutes.  Please log off now.
c:\wtsrv\system32\sleep 300
msg * This application server is shutting down for maintenance in 5 =
minutes.
Please log off now.
net stop spooler
c:\wtsrv\system32\sleep 300
msg * This application server is shutting down for maintenance NOW.  =
Please
log off immediately.
qwinsta | find "disc"> disc.lst
for /f "tokens=3D3" %%i in (disc.lst) do logoff %%i
del disc.lst
qwinsta|find "active" > active.lst
for /f "tokens=3D3" %%i in (active.lst) DO LOGOFF %%i
del active.lst
del c:\wtsrv\system32\spool\printers\*.* /q
del c:\wtsrv\jet*.tmp
echo y =A6 del %systemdrive%\temp\*.* /S
rd %systemdrive%\temp\ /s /q
md %systemdrive%\temp
cacls %systemdrive%\temp /E /P everyone:F
c:\wtsrv\system32\shutdown /reboot /delay:30

Several of the steps can be accomplished different ways, so the details
aren't all THAT important as long as your script works.  Mine was put
together from bits an pieces from this list as well.  I'd suggest =
kicking
off your script manually, letting it run, and verifying that everything =
you
wanted to happen actually DID happen when it comes back up before you
schedule it.

        -Jeff

> -----Original Message-----
> From: Murphy, Brian [mailto:bmurphy@xxxxxxxxxxxxxxxxxxx]
> Sent: Friday, November 22, 2002 4:54 PM
> To: 'thin@xxxxxxxxxxxxx'
> Subject: [THIN] Re: Reboot Script?
>=20
>=20
> Yes.  Sorry.  Meta 1.8 on W2k.  I'm also doing a file level=20
> defrag not shown
> in this script (Sysinternals contig.exe)...before reboot.  At=20
> reboot the
> system runs pagedrg (Sysinternals) that defrags the registry hives =
and
> pagefile.sys
>=20
*********************************************** 
This Weeks Sponsor: Wyse Technologies
Get a free whitepaper on how to secure
your corporate data from Wyse. Click Below. 
http://thethin.net/wyse.cfm 
*********************************************** 
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link.

http://thethin.net/citrixlist.cfm

Other related posts: