Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to load a printer driver (at least in xp)

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53427
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to load a printer driver (at least in xp)
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to load a printer driver (at least in xp) - 11/10/2007 8:51:44 AM   
  geek_01

 

Posts: 12
Score: 0
Joined: 4/24/2006
From: So.Cal.
Status: offline
You know, there is a lot of misunderstanding on how to load printer drivers via VBS.  This is mostly due to the documentation from Microsoft's example being completely wrong.

I thought I would post what I managed to get working.  I am told it doesn't work in Vista, but I don't have Vista so I don't know why, if someone can tell me I would like to know.


      

And here is my actual script.  Yeah, I didn't comment it, sorry.

      
 
 
Post #: 1
 
 RE: How to load a printer driver (at least in xp) - 11/10/2007 11:29:05 AM   
  Meg


Posts: 126
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
I can add printers in my XP desktop environment with the following code launched from a batch file.
We have Windows print servers and the printers are published in AD but that is probably not a prerequisite.
Maybe this would work with Vista?


      

(in reply to geek_01)
 
 
Post #: 2
 
 RE: How to load a printer driver (at least in xp) - 11/13/2007 4:46:17 AM   
  geek_01

 

Posts: 12
Score: 0
Joined: 4/24/2006
From: So.Cal.
Status: offline
That is not so much loading a driver as pointing to a mapping and automatically installing the associated driver.  A valid method, but not the best way in all situations.

-geek

(in reply to geek_01)
 
 
Post #: 3
 
 RE: How to load a printer driver (at least in xp) - 12/15/2007 9:57:50 AM   
  geek_01

 

Posts: 12
Score: 0
Joined: 4/24/2006
From: So.Cal.
Status: offline
I could really use some help on this.

Unfortunately I can confirm that this script does not work in vista.  It fails to install the drivers.

MSGBOX AddDriver returns -2146500045

I think that represents this:





SPAPI_E_INVALID_TARGET
0x800F0233
-2146500045

I can't figure out how thats an invalid target.... help... please...

(in reply to geek_01)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to load a printer driver (at least in xp) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts