Author Topic: Command line activation  (Read 18500 times)

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 546
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Command line activation
« on: June 14, 2018, 11:16:45 AM »
Hey Kirk, has anything changed recently for the command line activation of PM (macOS)?

Documentation: http://wiki.camerabits.com/en/index.php/User_Manual_Flat_View#Activation_via_Command_Line

I'm getting an error I didn't see before when I was testing this out:

Code: [Select]
sudo "/Applications/Photo Mechanic 5.app/Contents/MacOS/Photo Mechanic 5" --activate --name=Galveston\ Newspapers,\ Inc. --license=XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX
After the update to the latest build the command is now returning:

Code: [Select]
Incorrect number of arguments (4) for activate, should be 4 or more.
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #1 on: June 14, 2018, 02:01:56 PM »
Kevin,

Hey Kirk, has anything changed recently for the command line activation of PM (macOS)?

Documentation: http://wiki.camerabits.com/en/index.php/User_Manual_Flat_View#Activation_via_Command_Line

I'm getting an error I didn't see before when I was testing this out:

Code: [Select]
sudo "/Applications/Photo Mechanic 5.app/Contents/MacOS/Photo Mechanic 5" --activate --name=Galveston\ Newspapers,\ Inc. --license=XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX
After the update to the latest build the command is now returning:

Code: [Select]
Incorrect number of arguments (4) for activate, should be 4 or more.

Yes, sorry.  We forgot to document the change.  You need to pass a "description" of the machine being activated.  It's just a string of characters, anything you want really.  The parameter is --description="description of this computer"

-Kirk

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 546
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Command line activation
« Reply #2 on: June 15, 2018, 05:57:04 PM »
Thanks Kirk.

Any specific information y'all are looking for to be fed there? (I'm leaning towards computer name.) Does it need to be unique for each computer activated?

It doesn't look like activation details, only count, is available in the account portal.
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #3 on: June 16, 2018, 06:25:19 AM »
Kevin,

Thanks Kirk.

Any specific information y'all are looking for to be fed there? (I'm leaning towards computer name.) Does it need to be unique for each computer activated?

It doesn't look like activation details, only count, is available in the account portal.

It can be anything you want.  Basically when activation problems arise and users call us for help, having a description that our techs can read back to the user will help find older activations that can be removed on our end.

In the next build, I will probably make that parameter optional and 'auto-generate' it when it isn't provided.  If you try to enter a new license from within PM, the registration dialog does exactly this.  (you can check it out for yourself if you're curious.)

-Kirk

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 546
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Command line activation
« Reply #4 on: July 23, 2018, 09:35:29 AM »
Very cool. Looks like the auto-generated description is: Computer Name - Model - Serial number.

I can't see any reason to change that when activating from the command line so will just go with the default and skip that parameter completely.
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/

Offline snowwalker1988

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Command line activation
« Reply #5 on: December 09, 2020, 09:45:31 PM »
Hello,
this is nice way to activate PM6 Boy command line.
Do you have a solution íf the systems are in the network of the company with a proxy?
In Munki report I can see:
Running postinstall_script for Photo Mechanic 6 failed.
——————————————————————————
Not activated
Photo Mechanic 6 is not activated, applying registration.
Activation failed.
Result was: “The Authentication Server was unable to be contacted.
Please make sure you have an active internet connection
and try again. If this problem persists, please contact
Camera Bits for assistance: +1 503 547-2800


Is there a way for the Proxy on command line?

Best regards
Marcus

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #6 on: December 09, 2020, 09:49:41 PM »
Marcus,

this is nice way to activate PM6 by command line.
Do you have a solution íf the systems are in the network of the company with a proxy?
In Munki report I can see:
Running postinstall_script for Photo Mechanic 6 failed.
——————————————————————————
Not activated
Photo Mechanic 6 is not activated, applying registration.
Activation failed.
Result was: “The Authentication Server was unable to be contacted.
Please make sure you have an active internet connection
and try again. If this problem persists, please contact
Camera Bits for assistance: +1 503 547-2800


Is there a way for the Proxy on command line?

What OS are you installing Photo Mechanic via command-line?

-Kirk

Offline snowwalker1988

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Command line activation
« Reply #7 on: December 09, 2020, 11:01:06 PM »
It ist macOS Catalina and Mojave.

So the script works nice, but we must be in the company network while deploying it via munki - and there I got the error.

- Marcus

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #8 on: December 09, 2020, 11:11:54 PM »
Marcus,

It ist macOS Catalina and Mojave.

So the script works nice, but we must be in the company network while deploying it via munki - and there I got the error.

This may help: https://docs.camerabits.com/support/solutions/articles/48001080706-proxy-settings-for-activation

-Kirk

Offline snowwalker1988

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Command line activation
« Reply #9 on: December 10, 2020, 12:44:05 AM »
Unfortunately this does not help.

We have set the proxy with a proxy.pac in the network settings, but the terminal doesn´t use these settings.

And we have about 60 Macs, so it would be nice to find a solution via terminal / script.

-Marcus

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #10 on: December 10, 2020, 09:34:57 AM »
Unfortunately this does not help.

We have set the proxy with a proxy.pac in the network settings, but the terminal doesn´t use these settings.

OK, but Photo Mechanic does.  Does this proxy.pac file cause the System Preferences Network panel to set the http proxy settings for the active network device?

-Kirk

Offline snowwalker1988

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Command line activation
« Reply #11 on: December 11, 2020, 03:08:40 AM »
Yes it does for the WLAN.
We are using Cisco AnyConnect in top as VPN for the company - there I couldn´t set the proxy extra.
But the normal internet surfing ist possible.

Do you have data for your activation server? So that it is may possible to set this IP in the config.

-Marcus

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25063
    • View Profile
    • Camera Bits, Inc.
Re: Command line activation
« Reply #12 on: December 11, 2020, 08:21:52 AM »
Yes it does for the WLAN.
We are using Cisco AnyConnect in top as VPN for the company - there I couldn´t set the proxy extra.
But the normal internet surfing ist possible.

Do you have data for your activation server? So that it is may possible to set this IP in the config.

107.155.84.230 is the IP address.

HTH,

-Kirk

Offline snowwalker1988

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Command line activation
« Reply #13 on: January 27, 2021, 10:33:45 AM »
Thx for the help.
Our VPN was build now with a split possibilty and so now the activation via script is possible.

We are using Munki to deploy Photomechanic and there with a script we activate the software with the company key.

One question: In the About dialog it is possible to show the string of the machine with holding the shift-key while clicking OK.
Is this ID and the Activation Description wrote in a plist on the mac?
I search for a possibility to wrote this information on our server.
So if there is a problem with the mac or it is stolen, we could reset the device at your support.

Best regards,
Marcus

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 546
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Command line activation
« Reply #14 on: January 27, 2021, 10:38:09 AM »
You can control what details get written for the description using the --description flag.

I've got details on my blog: https://www.kevinmcox.com/2020/01/deploying-photo-mechanic-6-with-munki/

The default is "Computer Name – Model – Serial Number" but you could automate something else if you wanted to.
« Last Edit: January 27, 2021, 11:22:34 AM by Kirk Baker »
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/