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!

justinbischoff
Posts: 1
Joined: Tue Nov 05, 2013 9:08 pm

Adding Registry Keys from Command Line

Hello!

I am trying to add registry keys from the command line. However I have a small problem when try to set the (Default) value for a registry key.

If I try to add a default value for "SomeKey" it ends up being a value in the "Classes" key.
AdvancedInstaller.com /edit generic.aip /NewReg -RegValue HKCU\Software\Classes\SomeKey\ -data [#myFile]

Exported Registry Results from Windows:
[HKEY_CURRENT_USER\Software\Classes]
"SomeKey"="C:\\Program Files (x86)\\MyProgram\\myFile"

What I really want is a registry key with a default value, in regedit it shows up as "(Default)" and exports like this:
[HKEY_CURRENT_USER\Software\Classes\SomeKey]
@="C:\\Program Files (x86)\\MyProgram\\myFile"

Unfortunately I tried specifying the "@" or "(Default)" and neither of those work.

Thanks for any help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Adding Registry Keys from Command Line

Hi and welcome to Advanced Installer forums.

In order to achieve what you want you can use an empty property for the name of the registry value (i.e. [Default]) as in the following example:

Code: Select all

AdvancedInstaller.com /edit generic.aip /NewReg -RegValue HKCU\Software\Classes\SomeKey\[Default] -data [#myFile]
Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”