Unable to retrieve complex registry key - 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!

robdunbar
Posts: 4
Joined: Wed Jan 11, 2012 4:48 am

Unable to retrieve complex registry key

Hi,

I'm trying to get a folder path from a registry value. How ever I need to build up the key from two other values.

The first Key and value is found, AUTOCAD_VERSION = R18.1 = "Software\Autodesk\AutoCAD\CurVer"
The second is not. AUTOCAD_RELEASE = {nothing} = "Software\Autodesk\AutoCAD\[AUTOCAD_VERSION]\CurVer"
Needless to say, the path is not found either. AUTOCAD_PATH = {nothing} = "SOFTWARE\Autodesk\AutoCAD\[AUTOCAD_VERSION]\[AUTOCAD_RELEASE]\Location"

Although I could not test in AI, I ran the setup and then get a "Could not access network location \Plugins\CPSDM" as I am trying to use the path extracted from the registry to set the install path, being "[AUTOCAD_PATH]\Plugins\[ProductName]"

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

Re: Unable to retrieve complex registry key

Hi Rob and welcome to Advanced Installer forums,

Please keep in mind it's not correct to reference a search result public property inside another. This is because Windows Installer does not guarantee the searches' order.
Here's a thread that explains a similar functionality. You can adapt it to fit your own.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
robdunbar
Posts: 4
Joined: Wed Jan 11, 2012 4:48 am

Re: Unable to retrieve complex registry key

I ended up prefixing the search names with AA, AB and AC, to get the order working correctly.

But then I ran into another issue, for the 'AC_AUTOCAD_PATH' I tried to extract the path from the registry value by setting the search type to "This value contains a path to a directory" how ever this did not work. I then changed it to "Retrieve the raw value" and then I was able to get the path.

And now I find myself with another issue, that being the when trying to write some registry keys, they're being written into the "HK_LM\SOFTWARE\Wow6432Node\AutoCAD" instead of simply the "HK_LM\SOFTWARE\AutoCAD". Is there a way around this issue?
robdunbar
Posts: 4
Joined: Wed Jan 11, 2012 4:48 am

Re: Unable to retrieve complex registry key

I found your answer from another post.

What I did was go through each of my registry keys and values one at a time and,
then pressed F8, (takes you to the Organization page),
then ticked the 64-bit component box.

Return to “Common Problems”