We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Emmanuel
Posts: 17
Joined: Fri Mar 05, 2021 4:01 pm

Automation : how to set an existing property?

Hello,

How to set an existing property? For example : ARPURLINFOABOUT

I tried the code below, but since the property ARPURLINFOABOUT already exists, we get an error...

Code: Select all

$objPropComp = $project.PropertyComponent
$PropARPURLINFOABOUT = $objPropComp.NewProperty("ARPURLINFOABOUT","https://www.advancedinstaller.com")   
Thank you for your help

Emmanuel
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Automation : how to set an existing property?

Hello Emmanuel,

In order to achieve what you want, you can proceed as it follows:

Code: Select all

$aboutProp = $proj.PropertyComponent.FindProperty("ARPURLINFOABOUT")
$aboutProp.value = "your_value_here"
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emmanuel
Posts: 17
Joined: Fri Mar 05, 2021 4:01 pm

Re: Automation : how to set an existing property?

Thank you Catalin!
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Automation : how to set an existing property?

You are always welcome, Emmanuel!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”