[THIN] Autocreated printers not disappearing after disconnect

  • From: "Landin, Mark" <Mark.Landin@xxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Fri, 24 Sep 2004 13:30:11 -0500

We reboot our servers every night (because, fortunately, we can).

Apparently, when we force users to log off the system, it is not always
cleaning up their autocreated printers correctly. (These are being
created by Tricerat's Simplify Printing utility, not the standard TS or
ICA auto-creation). After a few days, you can tell the users who were on
the system when it got rebooted: they have multiple sets of printers
defined.

Here's my reboot script:
===================================================
REM  Script to do orderly shutdown, cleanup, update, and reboot of
Terminal Server
REM
REM  Don't let new users log on
REM
change logon /DISABLE

msg * WARNING: System maintenance beginning in 10 minutes. Please exit
all EBMS applications and log off NOW. Thank you
SLEEP 300
msg * WARNING: System maintenance beginning in 5 minutes. Please exit
all EBMS applications and log off NOW. Thank you
SLEEP 180
msg * WARNING: System maintenance beginning in 2 minutes. Please log off
NOW!
SLEEP 60
msg * WARNING: LOG OFF NOW, or you will be LOGGED OFF in 1 minute!
SLEEP 60
REM
REM  Log off all users ... they were warned! First, get a list of
"offenders"
REM
now *** Users still on at reboot: >> c:\tdw\stillon.log
quser >> c:\tdw\stillon.log
logoff ica-tcp <c:\tdw\yes
logoff rdp-tcp <c:\tdw\yes
now *** Users still on after clear: >> c:\tdw\stillon.log
REM
REM  Everyone should be off now, and no one can get back on
REM  

REM
REM  Backup the farm's IMA data store. 
REM
dsmaint backup C:\tdw

REM
REM  Clean up dead spooler and temp files
REM
net stop spooler
del c:\winnt\temp\*.* /q
del c:\winnt\system32\spool\printers\*.* /q

REM
REM  Are cleared disonnected sessions not getting enough time to clean
up 
REM  after themselves? Seems unlikely, but let's be sure...
REM
SLEEP 180

REM
REM  Update client software, if needed
REM
call c:\tdw\update.cmd

REM
REM  Reboot
REM
tsshutdn 5 /REBOOT
==============================

Am I not giving enough time (SLEEP 180) for the disconnecetd sessions to
be cleaned up? Is there some other command I can use to remove all
auto-created printers right before the reboot?

---
The T drive is not backed up 
********************************************************
This Weeks Sponsor RTO Software
Do you know which applications are abusing your CPU and memory?
Would you like to learn? --   Free for a limited time!
Get the RTO Performance Analyzer to quickly learn the applications, users,
and time of day possible problems exist.
http://www.rtosoft.com/enter.asp?id20
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: