Solved

vbscript to sliently install printer driver with rundll32.exe

Posted on 2011-02-23
7
656 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

705 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now