image
image
Ticket Options
Question Profile
DATEMar 18, 2008
TICKET#336712
STATUSClosed
SUBJECTNeeding help with writing a script
CATComputers, Operating Systems, Applications or Connected Devices
TYPEPeripherals: Printers, Scanners or other Connected Devices
DESCOther Printers
DESC
PLATFORMApple Macintosh (Intel)
MODELApple
PROC
RAM
DRIVE
NAMETrey
USERNAMEtrey5498
TECHNICALBeginner
ISSUETotally Lost
Question Details
TICKET ARCHIVE -> Needing help with writing a script
trey5498 - Mar 18, 2008 - 3:02 pm
image
image
I am generally a Windows guy and need to write a script that will install a LPR printer on Laptops.

The LPR port (or LPD) is in the format of BLDG-111-BW and the server would be named like printsever.college.edu. I have downloaded the drivers but I need to install the drivers. This all has to be in command line.

I can do it windows environment, but have no idea with mac/linux
earthsaver - Mar 18, 2008 - 4:31 pm
image
image
If you truly need help writing a script, I encourage you to post your query on the MacScripter forum. However, just to clarify, are you preferring a script mechanism because you'll be repeating this process on a lot of systems? The Add Printer window carries all the necessary fields you describe, and you can select the driver directly from this setup assistant. You could just manually plant the drivers you downloaded in the /Library/Printers folder. Be sure, though, that you've got Mac or CUPS compatible drivers, not Windows-only ones.

- Ben
trey5498 - Mar 19, 2008 - 7:38 am
image
image
Thank you for your quick response and I do have the appropriate driver for Mac. I didn't know the proper directory to put them in or how to install them or does moving them there already install them? Next what would be the command to add the printer on the lpr of lpd port to the mac is the below example close?


lpadmin -p BLDG-111-BW -v /dev/null -m "HP LaserJet 5230 PS" -ob3 -orm server.college.edu -orp BLDG-111-BW

I am not sure if that will work or is even close to working on an non CUPS server. I am also not even show if that is even close to correct in syntax.

I do appreciate any help in advance.
earthsaver - Mar 19, 2008 - 7:55 am
image
image
I haven't a clue about obscure UNIX commands like that, though you could check the lpadmin manual and maybe confirm your suspicions. (That's why I'm so thankful Apple has a reliable and functional GUI.) So, I'll reopen your question for another tech to address.

However, there's a difference between installing a driver and setting up a printer, at least in my experience. You can put a driver pretty much anywhere and outside of a number of locations that are queried by existing startup processes, you separately need to tell the system how/where to access that driver. The Printers folder is simply the logical place to put your driver, in my guessing.
trey5498 - Mar 21, 2008 - 11:02 am
image
image
I got the script working to install the printers, However I need to see what the command line way to check the version of OS X

IE:

if [ version = 10.5 ]
then
goto 10.5
else
goto 10.4
fi

???

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Friendly URLs by vBSEO 3.1.0