Increment value recieved from search within registry - 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!

janos.varadi
Posts: 11
Joined: Tue Jan 26, 2010 4:53 pm

Increment value recieved from search within registry

I am currently running a search on a registry key. The retrieved value is a number which shall be incremented and written back to the registry. I am using this search property within the registry area.

Within the data area I have [RESULT_PROPERTY]

I tried the following [RESULT_PROPERTY] + 1 and this will not work.

Is there a way to enter some math formulas in here?

Kind regards,

János
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Increment value recieved from search within registry

Hello,

You can create a Script Inline custom action, with the following code:

Code: Select all

Session.Property("SOMEPROP") = CStr(Session.Property("SOMEPROP") + 1)
The above code efficiently increments the value in SOMEPROP.
Make sure the custom action is set to Immediate execution.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
janos.varadi
Posts: 11
Joined: Tue Jan 26, 2010 4:53 pm

Re: Increment value recieved from search within registry

Hi Gabriel,


thanks a lot it works great. I am using DWORD so I had slightly modify the code.



Kind regards,

János

Return to “Common Problems”