Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 671
  • Last Modified:

vbscript to sliently install printer driver with rundll32.exe

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
birddog2008
Asked:
birddog2008
  • 3
  • 2
  • 2
1 Solution
 
RobSampsonCommented:
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
 
connectexCommented:
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
 
connectexCommented:
Ok. I missed the /q note in the inital question. Sorry about that.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
birddog2008Author Commented:
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
 
RobSampsonCommented:
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
 
birddog2008Author Commented:
Ya...no way to do it silently over the network... :(
0
 
birddog2008Author Commented:
No way possible to use any switch for it to be silent.  Just can't do it.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now