kamcknig
Posts: 14
Joined: Wed Nov 04, 2015 5:34 pm

Command line project, cant SetPackageName

I'm trying to use the SetPackageName command from the command-line though I'm not even sure if it's the right command. I want to set the "Product Name:" in the "Product details" section of the gui. These are the commands I've run so far in setting it up.

Code: Select all

1. Create new professional project file
	AdvancedInstaller.com /newproject passportpos.aip -type professional

2. Set the application dir for the project
	AdvancedInstaller.com /edit passportpos.aip /SetAppDir -buildname DefaultBuild -path [ProgramFilesFolder][Manufacturer]\[ProductName]

3. Set the shortcut directory (the name of the folder structure for the shortcut in the start menu)
	AdvancedInstaller.com /edit passportpos.aip /SetShortcutdir -buildname DefaultBuild -path [ProgramMenuFolder][ProductName]

4. Add files/folders to the project (files/folders can be added individually. this syncs the folders so it's always up-to-date)
	AdvancedInstaller.com /edit passportpos.aip /NewSync "APPDIR" "..\bin-release\Passport POS" -existingfiles delete
But then when I try to use SetPackageName I get this error

Code: Select all

AdvancedInstaller.com /edit Passport-cache /SetPackageName "Passport POS.exe" -buildname DefaultBuild
File not found: "<path to parent of project>\Passport-cache".
I'm not even sure where it gets the "Passport" string from in "Passport-cache".
kamcknig
Posts: 14
Joined: Wed Nov 04, 2015 5:34 pm

Re: Command line project, cant SetPackageName

I am also unable to use the NewReg command. When I run the following command I just get the syntax help printed out for AdvancedInstaller.com.

Code: Select all

AdvancedInstaller.com /edit passportpos.aip /NewReg -RegValue HKEY_CURRENT_USER\Software\[Manufacturer]\[ProductName]\Path -Data "[APPDIR]"
As A side note, in the gui version of my project the registry value is listed as a REG_SZ but in the documentation http://www.advancedinstaller.com/user-g ... w-reg.html I don't see that as an option for the command line
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Command line project, cant SetPackageName

Hi,
AdvancedInstaller.com /edit Passport-cache /SetPackageName "Passport POS.exe" -buildname DefaultBuild
File not found: "<path to parent of project>\Passport-cache".
This error appears because you do not write the correct name of the project. The name of the project that you want to edit must contain its ".aip" extension, too (e.g. passportpos.aip instead of Passport-cache).
I am also unable to use the NewReg command. When I run the following command I just get the syntax help printed out for AdvancedInstaller.com.
Can you please try to use the "HKCU" notation instead of "HKEY_CURRENT_USER" for your registry path and see if it works? This seems to be an Advanced Installer limitation that we will fix in a future version. Thank you for bringing it to our attention.
As A side note, in the gui version of my project the registry value is listed as a REG_SZ but in the documentation http://www.advancedinstaller.com/user-g ... w-reg.html I don't see that as an option for the command line
The "REG_SZ" type is the default type automatically used if no prefix is specified for the data, just as you did in your example (e.g. "[APPDIR]"). We will update this in our documentation, too.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kamcknig
Posts: 14
Joined: Wed Nov 04, 2015 5:34 pm

Re: Command line project, cant SetPackageName

This error appears because you do not write the correct name of the project. The name of the project that you want to edit must contain its ".aip" extension, too (e.g. passportpos.aip instead of Passport-cache).
*face palm*. I can't believe I didn't see that.
Can you please try to use the "HKCU" notation instead of "HKEY_CURRENT_USER" for your registry path and see if it works? This seems to be an Advanced Installer limitation that we will fix in a future version. Thank you for bringing it to our attention.
That worked, thanks!
The "REG_SZ" type is the default type automatically used if no prefix is specified for the data, just as you did in your example (e.g. "[APPDIR]"). We will update this in our documentation, too.
Excellent! Thanks!

As always, helpful answers that work :)

Kyle
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Command line project, cant SetPackageName

You're welcome Kyle. I'm glad I could help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Command line project, cant SetPackageName

I am also unable to use the NewReg command. When I run the following command I just get the syntax help printed out for AdvancedInstaller.com.
Can you please try to use the "HKCU" notation instead of "HKEY_CURRENT_USER" for your registry path and see if it works? This seems to be an Advanced Installer limitation that we will fix in a future version. Thank you for bringing it to our attention.
This was fixed in version 16.2 of Advanced Installer released on August 1st, 2019.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”