Share this post

Link to post

Share on other sites

BertInfo 0

Thanks a lot ... of course google is my friend and U now and more after this add (i hope so !!!)

But in fact, to be more explicit : i don't need to install a printer ... i've got a text file with informations, i call the function "_FilePrint()". But the printing configuration had to be customized, for example : changing printing orientation to landscape, paper size ... and from what i've ever search (on google!! and other ) all functions i've found are listed below :

$DriverName = $objFromPrinter.DriverName

$PortName = $objFromPrinter.PortName

$DeviceId = $objFromPrinter.DeviceId

$Location = $objFromPrinter.Location

$Network = $objFromPrinter.Network

$Shared = $objFromPrinter.Shared

$ShareName = $objFromPrinter.ShareName

$Availability = $objFromPrinter.Availability

$ShareName = $objFromPrinter.Description

$ShareName = $objFromPrinter.PrinterState

$ShareName = $objFromPrinter.PrinterStatus

$ShareName = $objFromPrinter.PrintJobDataType

$ShareName = $objFromPrinter.PrintProcessor

$ShareName = $objFromPrinter.SpoolEnabled

$ShareName = $objFromPrinter.SeparatorFile

$ShareName = $objFromPrinter.Queued

$ShareName = $objFromPrinter.Status

$ShareName = $objFromPrinter.StatusInfo

$ShareName = $objFromPrinter.Published

$ShareName = $objFromPrinter.Direct

$ShareName = $objFromPrinter.Location

$ShareName = $objFromPrinter.Priority

$ShareName = $objFromPrinter.WorkOffline

$ShareName = $objFromPrinter.HorizontalResolution

$ShareName = $objFromPrinter.VerticalResolution

So i'm trying ... "PaperSize" or "PaperOrientation" but it doesn't work ... and i repeat : i've search on Google and AUTOit forums but without success ... i hope you understand my words ... english have never been my favorite work at school

Share this post

Link to post

Share on other sites

Bert 1,127

Ok, from what you are saying, let me see if I understand what you are attempting.

You have a text file that has captured the info on a printer that is already installed.

You need to change the settings.

Am I right on this?

If I'm right, a MUCH better way of manageing your printer setups is to have a Windows Server (Or a PC will do in a pinch) that can be used as a print server. There is some work you would need to do on the front end, and it will take a while depending on how many printers and PCs you have in your enviroment. The important thing to remember is once you have done this, your work will be MUCH easier to manage, and to control. The payoff is on the backend of this little endevor, not the front.

1. Install the printer on the server or PC you want to have as a print server. Use TCP/P to connect to the printer.

2. Create a share of this printer on the server.

3. When naming the share, use a naming standard that will allow you to easily locate the printer in case you need to get to it.

example:

03_4000_15.131.15_PCL

03 = the floor

4000 = the model, in this case a LaserJet 4000

15.131.15 = Part of the IP you need. If everything in your enviroment begins with say "14", you can drop this off the name to make it shorter.

PCL= the driver being used. You could use PCL5, BW for black and white if you have a color printer set to print black and white, and use PCL_Color to denote a color printer.

4. For each PC, have then access the print server and douple click on the printer they want to have installed. THis will push the driver down to the PC, and the settings you want. THis will only connect the printer on a profile level, so if anyone else logs in, the printer won't be mapped. If you want to install the printer on a machine level, you will need to use the printer install utility Danny35d made. It can be found here.

Now here is the fun part. If you need to change the driver configuration, or change drivers, simply make the change on the print server. The changes will be pushed down to the users, so you don't need to do anything to the workstations. Also, if the user needs to be connected to a new printer, send them a link, and have them simply open it. No fuss, no muss.

Now if you simply need to change the settings on a printer driver that is on a user's PC, the command line stuff I sent you will do it. Basically, you would push the new driver with the settings you want, and that would overwrite what is on the PC. Take a look here for more info on how to use it.