Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoking "Add Printer" using command line 1

Status
Not open for further replies.

RSHH

IS-IT--Management
Aug 16, 2002
19
US
I'm trying to find the executable for "Add Printer" but can't find the .cpl or .exe file to do this on my box.

Can anyone help?
I'm using W2k adv-Srv.

Thanks in advance
 
Hi,

i m also searching for command line for Add printer in windows 2k and finally i got one solution that worked for me you also try nad see.

try out this command in rum or at dos prompt

"rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"

Hope this help you,

enjoy....... keep trying!!!!!!!!!!!!!!
 
It Rocks.... U'r star thanks.
 
If you want to setup a specific printer you can use vbscript. Save the following as a .vbs file and make the appropriate changes for your printer:


'Start Here
MsgBox "Creating Printer ..."
strPrinterPath = "\\MyServer\MyPrinter"
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection strPrinterPath
WshNetwork.SetDefaultPrinter strPrinterPath
MsgBox "Done."
'End Here


You can delete the line "WshNetwork.SetDefaultPrinter strPrinterPath" if you don't want it to be the default printer.

 
Another method you could use (a method i use) is with the kix32.exe (kixtart) logon application.
With the simple command :
addPrinter ("\\server\printer");
you can add printers through the logonscript It is impossible to make anything foolproof because fools are so ingenious.
Murphy's Laws
 
"Rundll32 printui.dll, PrintUIEntry /?" will also give you many options for installing local and network printers without user interaction...

hth Vic Rozumny, MCSE
Microsoft Corporation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top