Using LPADMIN on OSX installing HP printer driver with space between driver's name

Joined
Apr 25, 2008
Messages
6
Reaction score
0
Points
1
Hi All,

Using Apple Automator I'm trying to install HP IP printer via Lpadmin using the following code:
/////////////////
tell application "Terminal"
activate
do script "/usr/sbin/lpadmin -p BEHMEDLJ4015 -E -v lpd://192.168.1.1/ -m /Library/Printers/PPDs/Contents/Resources/HP LaserJet P4010_P4510 Series.gz -L \"BEHMEDLJ4015 \" " in front window
end tell

///////////////////

The code does not run due to have spaces between driver's name"HP LaserJet P4010_P4510 Series.gz"
So I added "\" to avoid the error "HP\ LaserJet\ P4010_P4510\ Series.gz" , but still getting error "Unknown argument "LaserJet"

Any advise?

Thanks in advance,

Abi
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Best advise Abi if you are not very familiar with Terminal, it can be a very dangerous place. Very strong black nagic.

Drivers are in your OS X operating system if it is a late model. Always best to show model and operating system.
 
OP
C
Joined
Apr 25, 2008
Messages
6
Reaction score
0
Points
1
Never mind,

I figure it out.

Here is the fix"

HP\\ LaserJet\\ P4010_P4510\\ Series.gz
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top