Generating License Trial in from Command Line - Advanced Installer Community
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Generating License Trial in from Command Line

Hi,

I am trying to generate a valid registration key from the command line. I've followed the instructions here, but I get the error message Invalid switch - "/edit", or (when omitting the /edit command) the installer project is opened on the license registration page with no further actions.

I have attached the .bat file I'm using (as a .txt solely to upload the file here).

Is there something I am missing, or am I misunderstanding the extent to which we can generate registration keys from the command line?

Thank you,

Francis
Enero Solutions Inc
Attachments
GenLicense.txt
batch file for generating license from command line
(366 Bytes) Downloaded 322 times
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Generating License Trial in from Command Line

Hello Francis and welcome to our forums,

From what I could have seen in your sent text file, you are using the "start" command wrong. The correct syntax of the "start" command is as follows:

Code: Select all

start "title" "path_to_executable"
It is important to always include a title. This can be a simple string like "My script" or just a pair of empty quotes "". According to the Microsoft documentation, the title is optional, but depending on the other options chosen you may encounter problems if it is omitted (just like in your scenario).

With that being said, your command line could look something like this:

Code: Select all

start ""  "C:\Program Files (x86)\Caphyon\Advanced Installer 15.5.1\bin\x86\AdvancedInstaller.com" /edit %aipPath% /GenRegLicense %trialID% -file "TestKeys.txt" -COMP_ID 3294431682934221
or you can simply omit the "start" command, as it follows:

Code: Select all

"C:\Program Files (x86)\Caphyon\Advanced Installer 15.5.1\bin\x86\AdvancedInstaller.com" /edit %aipPath% /GenRegLicense %trialID% -file "TestKeys.txt" -COMP_ID 3294431682934221
Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: Generating License Trial in from Command Line

Hi Catalin,

Thank you for the speedy reply.

I will give this a go and get back to you!

Cheers,
Francis
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: Generating License Trial in from Command Line

Hi Catalin,

I can confirm it now works fine. Thanks for the guidance!

Francis
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Generating License Trial in from Command Line

You are always welcome, Francis.

I am glad I could help.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”