Solved

vbscript to sliently install printer driver with rundll32.exe

Posted on 2011-02-23
7
659 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

776 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