Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

batch file to install printer

 
   Windows (Home) -> Print & Fax RSS
Next:  [Commercial] Windows Device Driver Training from ..  
Author Message
Steve Cummings

External


Since: Mar 24, 2008
Posts: 1



(Msg. 1) Posted: Mon Mar 24, 2008 11:18 am
Post subject: batch file to install printer
Archived from groups: microsoft>public>windowsxp>print_fax (more info?)

Hi -
I work for a non profit organization and we are trying to find a way to run
a Batch File that Installs a Local TCP/IP Printer with a specific IP address
with NO user interaction.
I have code that works for a BATCH file but it has to be run as a local
administrator. I am trying to have this batch file run as a login script on
our network to a bunch of laptop users on our domain.

Here is what I have -

-----------
cd c:\windows\system32
cscript prnport.vbs -a -r IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100
cscript prnmngr.vbs -a -p "Xerox Printer" -m "Xerox 4510" -r
"IP_192.168.1.115"
pause

------------

Ive tried this using a Run-As with the same code from above - but that
requires entering in a Password and we need this done automattically.
Also - the 2nd command does not work using Run as but the First command
does - i find that strange as well.

------------
cd c:\windows\system32
runas /profile /user:Domain\Account "cscript prnport.vbs -a -r
IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100"
runas /profile /user:Domain\Account "cscript prnmngr.vbs -a -p "Xerox
Printer" -m "Xerox 4510" -r "IP_192.168.1.115""
pause
-------------


If you can assist with another way of doing this or a way of doing this
using the same code would be really helpful.
I've done alot of research online and there seems to be no real way of doing
this.
I have tried many 3rd party applications that is suppposed to make this work
easily but I have not had any luck with getting it to work.

Let me know.

Thanks,
Steve
Back to top
Login to vote
Linn Kubler

External


Since: Oct 14, 2005
Posts: 30



(Msg. 2) Posted: Mon Mar 24, 2008 11:18 am
Post subject: Re: batch file to install printer [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Steve,

Finally, a question I can offer some help on. I'm curious though, why you
want to add a printer in a logon script, wouldn't that re-add the printer
each time the user logs on to the computer?

What I do is add the network printer globally to the workstation. Then it
is available for all users. Here is a helpful site that discusses this
option:

http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm

Here is a sample script I use for remotely installing a printer on a
computer. The computer must be running but does not need to have the local
administrator logged in. However, you do need to run the script as a user
who has administrative rights on the remote computer. In my case I run this
script logged in as the domain administrator and pass the name of the remote
computer as a parameter.

My script has two lines:
rundll32 printui.dll, PrintUIEntry /ga /n\\cmw-exch\CLAIMS /c\\%1
pause

If I call this script, remote_claims_printer_install.cmd, I would run it
like this, from the command prompt:

c:\>remote_claims_pritner_install.cmd comp1

To make the printer available to the end user you have to restart the print
spooler, but a reboot will handle that if you can wait. Otherwise there's a
couple of ways to remotely restart a service.

Hope that all helps,
Linn

"Steve Cummings" <scummings DeleteThis @ahrc.org> wrote in message
news:%23SCsUHcjIHA.5084@TK2MSFTNGP04.phx.gbl...
> Hi -
> I work for a non profit organization and we are trying to find a way to
> run a Batch File that Installs a Local TCP/IP Printer with a specific IP
> address with NO user interaction.
> I have code that works for a BATCH file but it has to be run as a local
> administrator. I am trying to have this batch file run as a login script
> on our network to a bunch of laptop users on our domain.
>
> Here is what I have -
>
> -----------
> cd c:\windows\system32
> cscript prnport.vbs -a -r IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100
> cscript prnmngr.vbs -a -p "Xerox Printer" -m "Xerox 4510" -r
> "IP_192.168.1.115"
> pause
>
> ------------
>
> Ive tried this using a Run-As with the same code from above - but that
> requires entering in a Password and we need this done automattically.
> Also - the 2nd command does not work using Run as but the First command
> does - i find that strange as well.
>
> ------------
> cd c:\windows\system32
> runas /profile /user:Domain\Account "cscript prnport.vbs -a -r
> IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100"
> runas /profile /user:Domain\Account "cscript prnmngr.vbs -a -p "Xerox
> Printer" -m "Xerox 4510" -r "IP_192.168.1.115""
> pause
> -------------
>
>
> If you can assist with another way of doing this or a way of doing this
> using the same code would be really helpful.
> I've done alot of research online and there seems to be no real way of
> doing this.
> I have tried many 3rd party applications that is suppposed to make this
> work easily but I have not had any luck with getting it to work.
>
> Let me know.
>
> Thanks,
> Steve
>
>
>
>
Back to top
Login to vote
grc1uk

External


Since: Apr 29, 2008
Posts: 1



(Msg. 3) Posted: Tue Apr 29, 2008 4:01 pm
Post subject: Re: batch file to install printer [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello

I have a similar need. The script is working fine but i need to
specify where the driver is for the printer that i am wanting to
install

how can i do this

many thanks

Gareth


--
grc1uk
------------------------------------------------------------------------
grc1uk's Profile: http://forums.techarena.in/member.php?userid=47668
View this thread: http://forums.techarena.in/showthread.php?t=937795

http://forums.techarena.in
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Batch file to add a network printer - Hi, I want to create a batch file that, when it is run from a workstation, automatically connects to a network printer. If someone could let me know what the syntax for this would be I would really appreciate it. Thankyou. Regards, Lee

Create a batch file? - I want to create a batch file, or a command file - I'm not sure what the correct terminology is. What I want to do is create an exe file which I can execute in windows when I choose to. I would want this file to bring up two different programs..

How to run a batch file upon logging off - Rick \Nutcase\ Rogers Wrote: > Pro only: Create a logoff script, add it to the group policy editor > (start/run gpedit.msc). Add to User Config/Windows Settings/scripts. Thank you for your reply. To answer Sparda, I am using Windows XP Pro, 2002....

Batch file not running to completion - I'm trying to set up a batch file (text below) that starts a bunch of my "usual suspect" apps. Excel (and Mozilla for that matter) doesn't appear to return control to the command processor, so the batch file stops running (e.g. if I close E...

Batch file: how to get all remaining parameters after a SH.. - My Batch-File is supposed to work like this: Invocation (variable parameter list): MYBATCH.CMD FOO BAR P1 P2 P3.... Execution (1) Execute MYBATCH_HELPER.CMD FOO (2) Execute BAR P1 P2 P3 .... How do I write this batch program? My first..
       Windows (Home) -> Print & Fax All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
  Windows Forums
 Game Forums
 Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact