Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2003, 06:07 AM
Acid Reign Acid Reign is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 190 Acid Reign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 57 m 52 sec
Reputation Power: 8
Send a message via ICQ to Acid Reign
Creating TCP/IP printer at login?

Due to the odd setup we have here, on some PCs the default printer is on a TCP/IP port on the local printer. Is it possible to have the port and printer added and set to default printer via a login script?

I currently have a WSH script that adds a normal shared printer based on the computer name apart from this one room.

EDIT:

Found an example of creating a printer via LPT1

Code:
'VBScript Example
Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddPrinterConnection "LPT1", "\\printserver\printer", _
True, "jbloggs", "password"

Now I need to know how to add the port

Last edited by Acid Reign : December 8th, 2003 at 06:11 AM.

Reply With Quote
  #2  
Old December 8th, 2003, 11:21 AM
guythomas guythomas is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Worcestershire, England
Posts: 35 guythomas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Set Default Printer

The key method is SetDefaultPrinter

Example.


' VBScript.
Dim net
Set net = CreateObject("WScript.Network")
net.SetDefaultPrinter "\\ServerName\PrinterName"

See more methods here

http://computerperformance.co.uk/Lo...ipt_Printer.htm


Guy Thomas
__________________
Guy Thomas
Ezine http://computerperformance.co.uk/ezine/newsletter_subs.htm

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > Creating TCP/IP printer at login?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT