Using a colon (:) in my "command line"

Discussion in 'Parallels Mac Management for Microsoft SCCM' started by dsmccrac, Aug 29, 2018.

  1. dsmccrac

    dsmccrac Member

    Messages:
    26
    Hi there. I am building an application in the text in the application's "command line" I am needing to use a colon and PMM is not letting it be interpreted as just a normal character, it is being viewed as being the divider between the installer portion and the uninstaller portion of the command.

    Specifically I am wanting to install a PKG of printer drivers and then (using the &&) run an lpadmin command. Something like this...

    :/usr/sbin/installer -pkg "Xerox Print Driver 4.17.1.pkg" -target "/" -verboseR && lpadmin -p printer_name -v smb://printserver/printer_name -D "printer_name" -P /Library/Printers/PPDs/Contents/Resources/Xerox\ VersaLink\ C7030.gz -o printer-is-shared=false -E -o auth-info-required=negotiate -o printer-op-policy='default' -o printer-error-policy=retry-job -o XROutputColor=PrintAsGrayscale:lpadmin -x env-gem-prt2 && pkgutil --forget com.xerox.print.xeroxPrinter.pkg:​
    It is the colon in "smb://" (highlighted in red, above) that is messing me up. This should be able to work if I could just get it to treat the colon as a good old hunk of text to pass through to the mac, but I dont know how. I tried "smb\://" and that did not work. (I have a workaround in that I could just build a "combined installer" in Packages that would do the trick but that seems like more work than needed.

    Any suggestions???

    don​
     
    Last edited: Aug 29, 2018
  2. Alan@Parallels

    Alan@Parallels Parallels Support

    Messages:
    3
    Hi Don,
    A workaround to this behavior could be just to use quotation symbols for the colon symbol itself.
    Following options are possible:
    smb":"//
    smb':'//
    smb\:// (without "")
    If nothing helps out, we recommend submitting a Support ticket which most likely will lead to a Feature Request and possible workaround.

    Alan Ramazanov
    Customer Support Engineer
    ||Parallels
     
  3. Hemnath@Parallels

    Hemnath@Parallels Parallels Support

    Messages:
    1,004
    Hello Don. We have received your response by e-mail, as quoted below. Please post your responses directly in this thread henceforth (i.e., if you are seeing this message in your mailbox right now, then do not respond to this e-mail - just visit the forum thread you posted in before and provide your response there).
    ---------------------------------------------------------------------------
    Thanks Alan!
    I have tried a backslash and I don't thjnk that worked but I will try the quotes (single and double) and see if they would work.

    Thanks!
    Don
    ---------------------------------------------------------------------------
     
  4. dsmccrac

    dsmccrac Member

    Messages:
    26
    Hi Alan, I tried your suggestions and they did not work. Likely no one cares about this but me, but I figured out how to do it!!!

    To recap I needed a colon :)) in my applications program command but I could not pass it through to BASH as colons are used by PMMas a delimeter.

    Here is the line I wanted for my applications program:
    :/usr/sbin/installer -pkg "Xerox Print Driver 4.17.1.pkg" -target "/" -verboseR && lpadmin -p env-mad-prt2 -v lpd:// printsrv/env-mad-prt2 -D "env-mad-prt2" -P /Library/Printers/PPDs/Contents/Resources/Xerox\ VersaLink\ C7030.gz:pkgutil --forget com.xerox.print.xeroxPrinter.pkg:​
    It was suggested I try all the usual BASH ways to pass a character, such as
    \:
    ":"
    ':'​
    and these did not work. In my poor mind it kind of makes sense that these would not work, as it is not BASH that is interpreting these but whatever syntax PMM is using. (The stuff between the quotes is BASH, but PMM is not interpreting the quotes per se as BASH - does that make sense?)

    Anyhow, for whatever reason, these BASH options don't work. So I decided to try using the ascii character code for a colon (0072) instead and IT WORKS!!!
    :/usr/sbin/installer -pkg "Xerox Print Driver 4.17.1.pkg" -target "/" -verboseR && lpadmin -p env-mad-prt2 -v lpd$(echo -e "\0072")//printsrv/env-mad-prt2 -D "env-mad-prt2" -P /Library/Printers/PPDs/Contents/Resources/Xerox\ VersaLink\ C7030.gz:pkgutil --forget com.xerox.print.xeroxPrinter.pkg:​
     

Share This Page