Here is my script that I use to avoid the gotcha of an administrator = session being active -remote or console (credit to Rick Mack for getting me = started in the right direction): :ts1_reboot set checkadmin=3D1 for /f "tokens=3D1" %%i in ('"quser /server:iceberg-ts1 | find /i "administrator""') DO set checkadmin=3D%%i if %checkadmin% =3D=3D administrator goto Else tsshutdn /server:iceberg-ts1 /reboot goto ts3_reboot :Else net send [your user account] "administrator logged into TS1. Reboot failed." goto ts3_reboot :ts3_reboot Ad infinitum Regards, --=20 Michael Earley Citrix, Windows, Exchange Administrator Ext: 244 ; Mobile: 0400 508 040 -------------------------------------------- Queensland Studies Authority -------------------------------------------- Level 7/295 Ann Street, Brisbane, QLD Australia 4000 Ph: (+617) 3864 0299 Fax:(+617) 3221 2553 E-mail: Michael.Earley@xxxxxxxxxxxxxx ------------------------------------------------------------------- You cannot achieve what you have not first imagined ... ------------------------------------------------------------------- Many that live deserve death. And some that die deserve=20 life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -Gandalf, Fellowship of the Ring ------------------------------------------------------------------- -----Original Message----- From: Goudreault.Louis@xxxxxxxxxxx = [mailto:Goudreault.Louis@xxxxxxxxxxx]=20 Sent: Friday, 8 November 2002 5:23 AM To: thin@xxxxxxxxxxxxx Subject: [THIN] RE : Re: Reboot script The line: C:\WINNT\system32\logoff.exe ica-tcp < yes Means that the logoff.exe will try to read it's input from THE FILE = named "yes". (if you try it in a command prompt you will get: "The system cannot = find the file specified.") You could rephrase that : Echo y | C:\WINNT\system32\logoff.exe ica-tcp It pipes a "y" to the logoff.exe app Try it in a command prompt but replace the y with a n so you won't get logged out. ---------------------------------------------------=20 Louis Goudreault=20 Tech Support=20 Software Development Group Hydro-Quebec=20 E-Mail: goudreault.louis@xxxxxxxxxxx=20 ---------------------------------------------------=20 -----Message d'origine----- De : Schneider, Chad M. [mailto:CMSchneider@xxxxxxxxx]=20 Envoy=E9 : 7 novembre 2002 13:48 =C0 : 'thin@xxxxxxxxxxxxx' Objet : [THIN] Re: Reboot script There is no one logged onto the consoles. What hurt was, the script is as follows... @echo off cls @Title Citrix XP Server Cleanup and Reboot Script. Change logon /disable msg * Citrix will be shutting down for maintenance in 15 minutes. = Please Logoff in 10 minutes, or risk damaging your files. You may log back on = in 25 minutes. SLEEP 300 msg * Citrix will be shutting down for = maintenance in 10 minutes. Please Logoff in 5 minutes, or risk damaging your files. = You may log back on in 20 minutes. SLEEP 300 msg * Citrix will be shutting = down for maintenance in 5 minutes. Please Logoff in 0 minutes, or risk = damaging your files. You may log back on in 15 minutes. SLEEP 60 msg * Citrix = will be shutting down for maintenance in 4 minutes. Please Logoff NOW, or = risk damaging your files. You may log back on in 15 minutes. SLEEP 60 net = stop spooler msg * Citrix will be shutting down for maintenance in 3 = minutes. Please Logoff NOW, or risk damaging your files. You may log back on in = 15 minutes. SLEEP 60 msg * Citrix will be shutting down for maintenance in = 2 minutes. Please Logoff NOW, or risk damaging your files. You may log = back on in 15 minutes. SLEEP 60 msg * Citrix will be shutting down for maintenance in 1 minutes. Please Logoff NOW, or risk damaging your = files. You may log back on in 15 minutes. SLEEP 60 msg * Citrix is shutting = down for maintenance NOW! Please Logoff NOW, or risk damaging your files. = You may log back on in 15 minutes. C:\WINNT\system32\logoff.exe ica-tcp < = yes C:\WINNT\system32\logoff.exe rdp-tcp < yes del C:\WINNT\system32\spool\printers\*.* /q del C:\WINNT\jet*.tmp /q del C:\DOCUME~1\WJVANA~1\LOCALS~1\Temp\*.* /q shutdown /C /R /L /T:30 = "Server Rebooting for Weekly Reboot!" And the logon disable without the reboots, leaves the server = unavailable. DOH! Just curious why that line fails. =20 -----Original Message----- From: Greg Reese [mailto:GReese@xxxxxxxxxxxxxxxx] Sent: Thursday, November 07, 2002 12:44 PM To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: Reboot script mine started screwing up if anyone was logged in at the console. =3D = Started happening out of nowhere a few months ago. Greg -----Original Message----- From: Schneider, Chad M. [mailto:CMSchneider@xxxxxxxxx] Sent: Thursday, November 07, 2002 1:40 PM To: 'thin@xxxxxxxxxxxxx' Subject: [THIN] Reboot script My reboot worked for the last year, until I got to iForum. :) I run it on Sunday nights, as we are a 24/7 shop. the line that = appears =3D to be messing me up is.... C:\WINNT\system32\logoff.exe ica-tcp < yes Ideas as to why? I have not made any changes to this script. Chad M. Schneider Technology Analyst II Curwood, Inc. Phone: 920-303-7609 Pager: 920-909-7609 ***********************************************=3D20 For Archives, to Unsubscribe, Subscribe or=3D20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ***********************************************=20 For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ***********************************************=20 For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ***********************************************=20 For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm *********************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm