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: 4959
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”