Script Input.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hiya,

Not sure ths is the correct forum, but I'm going to give it a shot.


Our company just installed 15 new copiers, most networked, all new
drivers and names on the network. I was made responsible to make a
script to add in to our login.bats (we run many different login
scriots depending on where you at in the company and what you need to
do) I have to ad this script to our login scripts to remove the "old"
instances of the copiers these replaced. This has to be done across
Citrix as well and PC workstations. The majority of our workstations
run XP, but we do have a few 2000 machines. But that doesn't matter
they all run the same scipts.


I was going to try just a simple script code to remove the references
to the printers.


'REMOVE ALL MAPPED PRINTERS IN THE CLIENT'S CITRIX SESSION
Set objNetwork = WScript.CreateObject("WScript.Network")
Set Printers = objNetwork.EnumPrinterConnections
For i = 0 to Printers.Count - 1 Step 2
strPrinterName = ""
strPrinterName = Printers.Item(i+1)
objNetwork.RemovePrinterConnection strPrinterName,1,1
Next


But as you can see it's for citrix ?


Then I found out about the PrintUI.dll call command and just using
it.


rundll32 printui.dll PrintUIRetry /dn /n\\printerserver\printer1
rundll32 printui.dll PrintUIRetry /dn /n\\printerserver\printer2


and so on.


But when I test it in the cmd prompt it fails, says it cant find the
printer and I'm looking at it on my print server.


I tried the syntax /dn to remove network printers, also tried it on
my
local machine with the /dl to delete local printers, this also
failed.


It has been ages since I scripted anything. What am I missing, this
isn't rocket science, I just want to remove old instances of thier
printers on thier AD accounts.


I figure run the script for a few weeks to assure all users are hit
and then remove the bit.


Thanks in advance.


.



Relevant Pages

  • Re: Adding Missing printer if they not there
    ... "JimsMind" wrote: ... I use this script to assign all network ... Here, we checked the machine and found all printers installed, then we ... Finally, at the end of my script, I simply check the true/false lines ...
    (microsoft.public.windows.server.scripting)
  • Re: Adding Missing printer if they not there
    ... I use this script to assign all network ... Set colPrinters = objWMIService.ExecQuery ("Select * From ... Here, we checked the machine and found all printers installed, then we ... Finally, at the end of my script, I simply check the true/false lines ...
    (microsoft.public.windows.server.scripting)
  • Re: Help migrating desktops to new print server
    ... Please know coding script is not supported in the newsgroup, ... you can use the script to add a network printer on Windows XP. ... How to Add Printers with No User Interaction in Windows ... then remove it once the migration is complete. ...
    (microsoft.public.windows.server.migration)
  • Looking for input, script input.
    ... Our company just installed 15 new copiers, most networked, all new ... do) I have to ad this script to our login scripts to remove the "old" ... 'REMOVE ALL MAPPED PRINTERS IN THE CLIENT'S CITRIX SESSION ... I tried the syntax /dn to remove network printers, ...
    (microsoft.public.windows.server.general)
  • Re: ntp woes (and more-general questions about startup and logging)
    ... the script didn't run the "stop" ... Our 10.4 machines are 10.4.7. ... been thinking that the underlying network, ... deny) what traffic (IP + port) goes to what port. ...
    (comp.sys.mac.system)