Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Adding Network Printers

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Adding Network Printers
  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 >>
 Adding Network Printers - 2/20/2008 3:32:34 AM   
  arstacey

 

Posts: 2
Score: 0
Joined: 2/20/2008
Status: offline
I have this script that is supposed to add a local tcp/ip port, then add a network printer adn make it the default.  It adds the port fine but I am getting this error on Line 90 Char 1 :
Error:  The parameter is incorrect
Code: 80070057
Source: (null)

This is on the line that reads: oPrintMaster.PrinterAdd oPrinter

Can anyone tell me what I am doing wrong?

Thanks!


      
 
 
Post #: 1
 
 RE: Adding Network Printers - 2/20/2008 3:53:18 AM   
  ebgreen


Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
I don't believe that PrintMaster.PrintMaster.1 is a normally installed COM object. What is it?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to arstacey)
 
 
Post #: 2
 
 RE: Adding Network Printers - 2/20/2008 4:43:08 AM   
  dm_4ever


Posts: 2641
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
It is part of the Win2k3 Resource Kit.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Adding Network Printers - 2/20/2008 4:44:03 AM   
  arstacey

 

Posts: 2
Score: 0
Joined: 2/20/2008
Status: offline
 Its not normally available.  You have to register the Prnadmin.dll in order to use it, as best as I understand from this article

http://support.microsoft.com/kb/321025

I am such a noob at this but cannot see where there are any errors.  I have made sure that teh dll is registered on my test system.

(in reply to ebgreen)
 
 
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 >> Adding Network Printers 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