|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Windows Help > Creating TCP/IP printer at login? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|