Solved

vbscript to sliently install printer driver with rundll32.exe

Posted on 2011-02-23
7
661 Views
Last Modified: 2012-05-11
Hello All,

I have an up and running script that will create a tcp/IP port and also the printer driver and queue.

when creating the printer queue and driver, it copies the driver from the network down locally.  So, the users will see a brief copy window.

Anyway of doing this so the user doesn't see this copy window?  The "/q" does not work.  It's quiet all right but doesn't install the driver.

Here is the string I'm using:

rundll32 printui.dll,PrintUIEntry /if /b PrinterName/f  PathToInfFile  /r IP_Port IPaddress /m PrinterModel

0
Comment
Question by:birddog2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 34966455
Does it help if you use:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b PrinterName/f  PathToInfFile  /r IP_Port IPaddress /m PrinterModel", 0, True

Regards,

Rob.
0
 
LVL 13

Expert Comment

by:connectex
ID: 34966669
This doucment from Microsoft covered printui.dll and it's various options: http://download.microsoft.com/download/8/2/c/82cffcfa-56f6-4fc3-bfa5-80cd84793871/PrintUIUsersGuide.doc. There is a switch /q for quiet. So it's not really necessary to use VBScript to do this.
0
 
LVL 13

Expert Comment

by:connectex
ID: 34966678
Ok. I missed the /q note in the inital question. Sorry about that.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:birddog2008
ID: 34971479
Np Connectex...ya too bad that doesn't work.  It works if the driver is local...so if you used /q /u...works actually brilliantly...but for me all the drivers will be on the net for most all users the first few times.

Hi Rob - No...that doesn't work either...it is exactly the same result weather you use cmd /c or not.  That's the other problem.

Any other ideas?

Thanks!
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 34976823
Have you tried the /Gw switch?  This is supposed to suppress any driver warnings.

Other than that, I don't really see a way to hide the file copy process.....

Regards,

Rob.
0
 

Accepted Solution

by:
birddog2008 earned 0 total points
ID: 35201997
Ya...no way to do it silently over the network... :(
0
 

Author Closing Comment

by:birddog2008
ID: 35230122
No way possible to use any switch for it to be silent.  Just can't do it.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question