Registry entries - 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!

adingemanse
Posts: 1
Joined: Mon Oct 19, 2009 10:44 am

Registry entries

Hello,

With Advanced Installer I want to create a package that copies some Excel-addins to the correct location and create the registry entries that configure them in Excel 2007. Regarding the registry entries I have two questions.

Registry Addins for Excel 2007 are located in
HKEY_CURRENT-USER\Software\Microsoft\Office\12.0\Excel\Options\
For each loaded addin an OPEN-key is added
OPEN “Addin–number 1.xlam”
OPEN1 “Addin–number 2.xlam”
OPEN2 “Addin–number 3.xlam”

- How can I check if there already exists a key with a particular value (e.g. “Addin–number 2.xlam”)
- If the key doesn’t exists how can I determine the correct next number to add a new key (e.g. OPEN3)

Many thanks,
Alex
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Registry entries

Hello and welcome to Advanced Installer Forums,
- How can I check if there already exists a key with a particular value (e.g. “Addin–number 2.xlam”)
You can use a Search for the specific key/value. If the search returns null then the key/value does not exist.
- If the key doesn’t exists how can I determine the correct next number to add a new key (e.g. OPEN3)
You will have to use a custom action for this, as Windows Installer has no way of extracting the number from the value name (open1, open2, open3 etc.). The algorithm would look something like this:
1) X=0
2) check to see if open(X+1) exists
3) if it does not exist, go to step 4), else go to step 5)
4) create open(X+1) and go to step 6)
5) X = X + 1 and go to step 2)
6)finish algorithm
You can achieve this in the language of your choice, be it c++, vbscript or something else.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”