Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Printer re-install using prnadmin.dll

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Printer re-install using prnadmin.dll
  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 >>
 Printer re-install using prnadmin.dll - 3/23/2005 3:26:30 PM   
  Zaheer

 

Posts: 1
Score: 0
Joined: 3/23/2005
From:
Status: offline
I have created printer installation scripts that work fine by adding port as well as the printer. However, sometimes for whatever reason the script installs only the port and not the printer. When the script is run again, it displays errors about already existing port.

Then I created a script that deletes the already exisiting printer and port and re-installs it. It works only when the there are pre-existing printers. But it does not work when there is no pre-existing printer and port.

So I wanted to create a conditional script for deleting pre-exisitng printer and port using if..then statements. Here the script does not work. The script does not delete the printer when if...then statement is used.

In short, I need one script that works in two situations:

1. When there is no pre-existing printer and port: Installs a port and printer.
2. When there is an existing printer or port or both: Deletes the exisiting printer and port and re-installs them.

Any ideas will be greatly appreciated.
 
 
Post #: 1
 
 Re: Printer re-install using prnadmin.dll - 3/23/2005 5:29:04 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Could you post your script so everyone can get a chance to see and offer help ?

(in reply to Zaheer)
 
 
Post #: 2
 
 Re: Printer re-install using prnadmin.dll - 3/23/2005 9:46:48 PM   
  cjwallace

 

Posts: 491
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Me to i would be interested in seeing this script

(in reply to Zaheer)
 
 
Post #: 3
 
 
 
  

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 >> Printer re-install using prnadmin.dll 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