vs2010junkie
Posts: 4
Joined: Thu Nov 10, 2011 1:22 am

Exec command output using GetProperty Command Line

I am currently using MSBuild to capture the value of a property in Advanced Installer via the Exec command.

I am using the following syntax for MSBuild:

Code: Select all

<Exec Command="$(BaseEditCommand) /GetProperty ProductName">
     <Output TaskParameter="Outputs" PropertyName="PackageName" />
</Exec>
When I execute MSBuild, I notice that the name of the property is being output to the Console window, but the actual property value is never being captured and stored in the MSBuild property (in this case $(PackageName))

How do I get the Advanced Installer Command Line to output the property value and appropriately store it in the MSBuild Property?

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Exec command output using GetProperty Command Line

Hello,

Unfortunately this is not supported by Advanced Installer although we already have it on our low priority TODO list.
Feedback from our development team states the functionality is currently under investigation.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wyzerd
Posts: 75
Joined: Tue Mar 27, 2007 3:54 am
Location: St. Louis, MO
Contact: Website

Re: Exec command output using GetProperty Command Line

This functionality is documented and supposed to be supported. I was looking for an answer to this as well since the documentation on how to call this is a little vague.

Here is the text from your help:

Advanced Installer 11.3

Usage:
advinst.exe <path_to_project_file>
advinst.exe /help [<command>] | /? [<command>]
advinst.exe /build <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] } [-force]
advinst.exe /rebuild <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }
advinst.exe /edit <path_to_project_file> <command>
advinst.exe /execute <path_to_project_file> <command_file_path> [-nofail]
advinst.exe /loadpathvars <path_variables_file_path>
advinst.exe /newproject <path_to_project_file> [-type project_type] [-lang project_language] [-overwrite]
advinst.exe /register <license_id>
advinst.exe /registerfloating <host>:<port>
advinst.exe /cfglicensesrvproxy [-set <host>:<port>] | [-disable]

Supported Commands:
.....
/SetProperty <name=value> [-buildname <build_name>]

/DelProperty <property_name> [-buildname <build_name>]

/GetProperty <property_name> [-buildname <build_name>]

/SetProductCode -langid <langId> [-guid <guid>]

......

The command I ran was:
AdvInst.exe I:\MonacoSetup.aip /GetProperty Build

I also tried AdvInst.exe /edit I:\MonacoSetup.aip /GetProperty Build

The SetProperty does work, I've been using it for years, but there is something broken in the interface that is not allowing it to reach GetProperty
Daniel
Posts: 8279
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exec command output using GetProperty Command Line

Hello,

Please keep in mind that the correct syntax of the /GetProperty command is the following:

Code: Select all

AdvancedInstaller.com /edit MyProject.aip /GetProperty PROPERTY
For example, you can use the following command line to display your "Build" property:

Code: Select all

AdvancedInstaller.com /edit MyProject.aip /GetProperty Build
Let us know if this helps.

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

Return to “Common Problems”