Sign in to follow this  
Followers 0
BigDaddyO

Create New Network Printer Script

3 posts in this topic

#1 ·  Posted (edited)

These scripts are all COM so you need AutoIT Beta. This is mostly VBScript that I have converted and pieced together for my purpose.

The Lab_990cxi_Install.au3 file installs a new Network Printer:

I noticed that there were a lot of examples on how to add a new printer using vbscript but they always failed for me. Turns out you have to use a script to add the driver for that printer, then if it uses a TCP/IP port to print to you have to add that port also, then you can actually add the printer.

The Printer_Default.au3 will select a printer and let you print to it. Once the Print Job has finished it will prompt you to switch back to your privious Default printer. If you choose no it will again prompt you after each print job.

For my purposes I am setting the PrimoPDF printer as the default printer so users can create PDF docs. Once the document is created they are prompted to return there default printer back to how it was.

Any questions just let me know.

Mike

PS. To get the proper settings for a printer you need to install it manually then use the ScriptoMatic for AU3 written by SvenP in order to retrieve the proper settings. specifically use the following: Win32_PrinterDriver, Win32_TCPIPPrinterPort, and Win32_Printer.

edit: In further testing or Lab_990cxi_Install.au3 I noticed that the Port Number under Add the Printer Port is where you need to modify if you are using a JetDirect port. I am using a 3 port Jetdirect 500x and port 9100 is port 1, 9101 is port 2, and I am guessing that 9102 will be port 3.

Lab_990cxi_Install.au3

Printer_Default.au3

Edited by MikeOsdx

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'm sorry but why do you need to upload an exe? Also, A+ for bump of 4+ year old topic too that you didn't really need to bump...

EDIT: Typo

Edited by BrettF

Share this post


Link to post
Share on other sites

I'm sorry but why do you need to upload an exe? Also, A+ for bump of 4+ year old topic too that you didn't really need to bump...

EDIT: Typo

3+

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0