Pull target folder from user's 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!

kep
Posts: 1
Joined: Sun Apr 29, 2012 9:32 pm

Pull target folder from user's registry

I'm needing to install files in specific locations that the user is free to change. The only real clue is that these folder names will be stored at known locations in the registry. I've found the /AddRegLocator switch that can be used on a command line build. But, the example offered in the docs isn't incredibly illuminating...

Code: Select all

AdvancedInstaller.com /edit MyProject.aip 
    /AddRegLocator REG_SEARCH_RESULT -signature reg_search 
    -root HKLM -key Software\MyKey\
If I understand that correctly, the property name "REG_SEARCH_RESULT" could then be used in subsequent calls in the very same manner as the predefined variables (eg, APPDIR, WindowsFolder, MyPicturesFolder, etc) can be used? IOW, I could then do something like...

Code: Select all

AdvancedInstaller.com /edit MyProject.aip 
    /AddFile REG_SEARCH_RESULT D:\path\file.ext
Have I totally missed the point of this function, or is that essentially the way it can be used?

If I understood that part correctly, then I do have a couple of follow-ups...

* What's the point/signficance of the <signature> parameter?
* Would I need to use the -type LocatorTypeDirectory switch to use this as I would a pre-defined folder?

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

Re: Pull target folder from user's registry

Hi and welcome to Advanced Installer forums,
If I understand that correctly, the property name "REG_SEARCH_RESULT" could then be used in subsequent calls in the very same manner as the predefined variables (eg, APPDIR, WindowsFolder, MyPicturesFolder, etc) can be used?
No, actually the result is a public property who's value you can assign to APPDIR for example. Here's the "Set APPDIR Command Option" article to help you with this.
What's the point/signficance of the <signature> parameter?
This parameter links the search with the location in the table. This is described in this MSDN article. The GUI equivalent is not needed because the signature is automatically assigns the location with the search when adding it under the search.
Would I need to use the -type LocatorTypeDirectory switch to use this as I would a pre-defined folder?
As this is the equivalent of the GUI registry location, this type's usage is described in the Registry Location Properties article .

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”