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!

paasen
Posts: 6
Joined: Tue Jun 23, 2015 8:41 am

Problem importing registry file

>Importing .reg file that looks like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\TEST\[ProductName]]
"TEST"="[ProgramFilesFolder][ProductName]\\file.dll"

>In AI 12.2 Registry section it looks like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\TEST\[ProductName]]
"TEST"="[\[]ProgramFilesFolder[\]][\[]ProductName[\]]\\file.dll"

>It adds "\[]" and "[\]" to the data value but not the key value.

>After MSI installation registry looks like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MYPRODUCT]
"TEST"="[ProgramFilesFolder][ProductName]\file.dll"

>Insallation translates key correctly but NOT data because it adds "\[]" and "[\]" to its value.
>Why are they imported differently?
>How should the .reg file look like so that import also works for data?

>Registry should look like this after MSI installation:
[HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MYPRODUCT]
"TEST"="C:\Program Files\MYPRODUCT\file.dll"
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem importing registry file

Hi and welcome to Advanced Installer forums,

Can you send us the reg file you are trying to import so we can test the behavior?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
paasen
Posts: 6
Joined: Tue Jun 23, 2015 8:41 am

Re: Problem importing registry file

Thanks.

Attached reg file.
Attachments
test.reg.txt
(292 Bytes) Downloaded 307 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem importing registry file

Hello,

Indeed this behavior occurs because the import expects raw data, not formatted references. Unfortunately there's no workaround not to escape the straight brackets.
If you are using the reg file to avoid having to set the same thing in multiple projects, please keep in mind you can have a template project instead.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
paasen
Posts: 6
Joined: Tue Jun 23, 2015 8:41 am

Re: Problem importing registry file

Ok, thanks.
Maybe there is a way to do "find and replace" in registry in AI?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem importing registry file

Hello,
Maybe there is a way to do "find and replace" in registry in AI?
Yes there is. Replacing existing registry values is already the default option for any value added in the Registry page. You could add a search for the same entry from the Search page and use its name to condition the registry value's component from the Organization page.

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

Return to “Common Problems”