Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

batch file to add printers to windows 2000 server


  • Please log in to reply

#31
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
ok i tried the first one and received this error

swbemservices not found

hmmmmm.
  • 0

Advertisements


#32
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
well bad news. found out that windows 2000 and before can not use prnport.vbs or prnmngr.vbs only xp and newer. however. i can use the rundll32 printui.dll and PrintUIEntry however, i am running into issues with this one. any experience using these?
  • 0

#33
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
ok here it is. i have a script that will [bleep] the printers as long as the tcp/ip ports are pre installed. here is the script

rundll32 printui.dll,PrintUIEntry /if /b "E221" /f %windir%\inf\ntprint.inf /r "E221" /m "HP Laserjet 4" /z

would you possably know a way to add the tcp/ip ports without user interaction other than the prnpot.vbs??
  • 0

#34
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
when you set up for conventions....are all 16 servers always in the same place? like...you take all 16 servers and all howevermany laptops to one convention at a time? or is it...one server per convention?
  • 0

#35
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
2 severs (1 main, 1 backup running sql) and however many laptops needed. however we have multiple shows going on at the same time in multiple locations or states. we do have a few larger shows that require 4 servers.
  • 0

#36
gerryf

gerryf

    Retired Staff

  • Retired Staff
  • 11,365 posts
didn't the first script in post 29 do it (create the port?)

It should work in 2000
  • 0

#37
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
post31-
unfortunatley no i received the following error

swbemservices not found
  • 0

#38
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
don't know if this would work...but i'm gonna do some more research http://www.microsoft...&displaylang=en it's a print server migration tool for 2000...i think that it basically copies out all the local printers from one print server in such a way as to reconnect them on another....so you'd only need to set up ALL the printers on one server then use this for the rest...maybe
  • 0

#39
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
http://download.micr.....ator 3.1.doc there's the manual...trying to sift through it to see if it would do what you want...on a prelimenary look through...it looks like it would work
  • 0

#40
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
yeah, i have the migration tool, but to use it i must first add 255 print ports and printers manually. since these printers are not plugged into the network, you have to wait for it to time out when adding them. it takes about 2-3minutes per port and printer to do this, so it would take about 785 minutes to set it up to use the migrator. good thought though.
thanks.
  • 0

Advertisements


#41
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
thank you all very much for all the advice and help. THE SCRIPT IS DONE!!!!! here is what had to be done to get it working.
Install 2003 server resource kit, on a xp machine, steal the prnadmin.dll and clean.vbs files and move them to root of c: on 2000 machine. Register prnadmin.dll using start , run, Regsvr32 %Drive%:\Prnadmin.dll., create and run a .bat file that is written as follows.



cscript.exe clean.vbs –b

cscript.exe clean.vbs –p

cscript.exe portnstl.vbs

rundll32 printui.dll,PrintUIEntry /if /b "hp4" /f %windir%\inf\ntprint.inf /r "hp4" /m "HP Laserjet 4" /Z ( to add new printers)



It does the following

runs a .vbs to remove current printers
runs .vbs to remove current ports
runs.vbs to install new ports (see below)
installs new printers using rundll32 printui.dll, PrintUIEntry……. And duplicated 255 times for the printers.


The portnstl.vbs script is written as follows, and then duplicated 255 times changing host name and ip address

dim oPort

dim oMaster

set oPort = CreateObject("Port.Port.1")

set oMaster = CreateObject("PrintMaster.PrintMaster.1")

oPort.ServerName = ""

oPort.PortName = "hp4"

oPort.PortType = 1

oPort.HostAddress = "10.0.7.255"

oPort.PortNumber = 9100

oPort.SNMP = false





if you would like to see the finished version complete adding all 255 ports and printers, and the .vbs scripts let me know.


it was a cobination of things that got it woking finally. they had to be done in a certain order as well. thanks again for all the help and hard work that you all put into this for me to help me get this figured out
  • 0

#42
bournym

bournym

    New Member

  • Member
  • Pip
  • 1 posts
Bringing this topic out of the arc..

I have been looking for a way to get TCP/IP port working winth windows 2000 and this thread seems to be the closest I have come to an answer but I cannot get it to work.

I copied the dll and registered it fine .
Created a .vbs and edited with my ip address I need to create a port for .
I now have got rid of the error SWbemServices : Not found but this time I dont get anything but a clarification Cscript has executed but no error and no IP port is installed.

Any Help appreciated .

Thanks
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP