drschenk
Posts: 6
Joined: Tue Apr 05, 2011 12:18 pm

issue with registry keys

Hi,

exporting, as an example, part of my registry under Windows 7 (x64) for later importing it in AdvancedInstaller, I get the following .reg file content:

--------------------------------------------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Licensing]

[HKEY_LOCAL_MACHINE\SOFTWARE\Licensing\Test 1.0]

[HKEY_LOCAL_MACHINE\SOFTWARE\Licensing\Test 1.0\Multipurpose]

"OptionRestrictions"=hex(7):00,00,00,00
"NotBefore"=hex(b):00,00,00,00,00,00,00,00
"NotAfter"=hex(b):00,00,00,00,00,00,00,00
"CallerRestrictions"=hex(7):00,00,00,00
"ReleaseDateCovered"=hex(b):00,b0,31,5d,90,6d,d0,01
----------------------------------------------------------------------------------------------

Now, when I try to import this .reg file with AdvancedInstaller under Resources->Registry, I get only the following keys imported, values with hex(b) : ..... are missing :

Image

Did I miss something here?
Any help would be appreciated.
Many thanks in advance
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: issue with registry keys

Hi,

I tried to import the registry keys you mentioned, in an AIP file created with Advanced Installer 11.4, but I get an error saying that "it does not appear to be a valid registration file".

Can you please send us the exported .reg file, so we can test it and try to find the problem?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
drschenk
Posts: 6
Joined: Tue Apr 05, 2011 12:18 pm

Re: issue with registry keys

Hi,
here is the exported .reg File (in TestReg2.zip).
Best regards
Attachments
TestReg2.zip
.reg file generated with regedit.exe export under Windows 7 x64
(396 Bytes) Downloaded 240 times
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: issue with registry keys

Hi,

I tested the file that you sent and, indeed, I reproduced the behavior. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

Meanwhile, you can remove the "(b)" and "(7)" characters after the "hex" notations and it should work:
  • Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Licensing]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Licensing\Test 1.0]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Licensing\Test 1.0\Multipurpose]

    "OptionRestrictions"=hex:00,00,00,00
    "NotBefore"=hex:00,00,00,00,00,00,00,00
    "NotAfter"=hex:00,00,00,00,00,00,00,00
    "CallerRestrictions"=hex:00,00,00,00
    "ReleaseDateCovered"=hex:00,b0,31,5d,90,6d,d0,01
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BrightShadow
Posts: 2
Joined: Fri Aug 18, 2017 11:01 am

Re: issue with registry keys

Hi all,

After almost 4 years I have the same issue with my registry key.

The registry key has some entries that cannot be imported and are discovered in WIndows registry as REG_QWORD. WHy are you not supporting it?
The reg keys I'm using is a license , and it cannot be changed as you described, because the Advanced Installer recognizes changed keys as BINARY values and puts wrong entries to registry.
It has to be REG_QWORD, how to achieve this?

It is very critial, I would have a release in 1 week and we had to stop the regression now.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: issue with registry keys

Hello and welcome to our forums,

Advanced Installer doesn't support importing REG_QWORD entries. This improvement is on our TODO list. Unfortunately, since these were the only requests the improvement was postponed due to low priority. I increased its' priority and hopefully it will be available soon. Once this improvement will be available, we will update this thread.

As a workaround you could avoid using our registry support and create a BAT file which adds the .reg file into the registry. This is the complete method:

-add the .reg file to "Files and Folders" page a Temporary File
-create a bat file with the following content:

Code: Select all

reg import %1
-add this bat file to "Files and Folders" page, also as a temporary file
-create a "Launch File" custom action for launching this bat file. Place this custom action after "Add resources" in "Install Execution Stage". This custom action should be configured to run on Deferred and "under the LocalSystem with full privileges(no impersonation)" and to receive the registry file as a command line argument. Please note that this property reference should be between quotes as the path could contain empty spaces. Please take a look on the attached screenshot that shows how this custom action is configured.

I've attached the sample project I've configured for your scenario.

In a similar fashion, you could create a bat file that deletes the registry entries launched by a custom action configured to run at uninstall.


Best regards,
Sorin
Attachments
Sample Project Add reg file.zip
(3.85 KiB) Downloaded 192 times
screenshot.png
screenshot.png (15.59 KiB) Viewed 3862 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BrightShadow
Posts: 2
Joined: Fri Aug 18, 2017 11:01 am

Re: issue with registry keys

Thank you, that was my last idea to achieve this. I just need two separate lunch actions because different key is for 64bit and different for 32 bit machines. But this is simple.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: issue with registry keys

Hello,

You are always welcome. Should there be any difficulty implementing something, please let me know and I will gladly assist.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”