Read path from registry, if not found, use a default - Advanced Installer Community

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!

Fulgan
Posts: 101
Joined: Mon Feb 27, 2012 10:42 am

Read path from registry, if not found, use a default

Hello,

It seems simple but I can't find a solution to this:

The application should check if a registry entry exists. If it does and it it points to an existing folder, it shouldn't change it but must place the value into a property. If it doesn't exists, it should place a default value into that property (specifically, [LocalAppData]\MyProduct\MyFolder)

I've created a registry search and that works fine but how can I handle the second part ?

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Read path from registry, if not found, use a default

Hi

You can do the second part by creating a "Set installer property" custom action. There you will set the property you want to write in, the value you want to write and the condition. It would be better for you to move this custom action behind the "Searches" in the Wizard Dialog Stage.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fulgan
Posts: 101
Joined: Mon Feb 27, 2012 10:42 am

Re: Read path from registry, if not found, use a default

Thanks, it looks like it's working
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Read path from registry, if not found, use a default

You're welcome. I am glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”