jstuardo
Posts: 87
Joined: Mon Nov 09, 2015 10:44 pm

How to add parameter to Data in Registry Value Editor

Fri Oct 23, 2020 10:36 pm

Hello,

If I add new value in the registry editor, the Edit Registry Entry dialog appears.

If I don't enter the name, and add a data, for example, [#MyFile.exe], a (default) entry is created with the data of "[#MyFile.exe]", including the quotes.

How can I add, for example, "[#MyFile.exe]" "%1" to the (default) key?

That kind of values are present, for example, when Zoom application is registered in the system, so that it can be launched using the web browser. In case of Zoom, this is the (default) entry of key HKEY_CLASSES_ROOT\zoommtg\shell\open\command:

"C:\Users\jaime\AppData\Roaming\Zoom\bin\Zoom.exe" "--url=%1"

I need to achieve the same using Advanced Installer.

Thanks
Jaime

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to add parameter to Data in Registry Value Editor

Wed Oct 28, 2020 3:15 pm

Hello Jaime,

If I understand correctly your request, what you want to do is to associate your application with an extension?

For instance, similar to how all the .txt files are opened using the default Windows' Notepad.exe:
notepad.png
notepad.png (90.56KiB)Viewed 3183 times
Please note that this can be achieved by using our predefined support for "File Associations" - you do not need to manually edit a registry entry.

FA.png
FA.png (224.58KiB)Viewed 3183 times
FA2.png
FA2.png (14.86KiB)Viewed 3183 times
FA3.png
FA3.png (19.85KiB)Viewed 3183 times
FA4.png
FA4.png (21.06KiB)Viewed 3183 times

Please let me know if this is of help for you, otherwise please give me some more details about what you want to achieve.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

jstuardo
Posts: 87
Joined: Mon Nov 09, 2015 10:44 pm

Re: How to add parameter to Data in Registry Value Editor

Wed Oct 28, 2020 4:48 pm

No... the problem has nothing to do with that. Sorry if I was not very clear.

I will explain you with an example.

Please see this picture:
AI_AddReg.png
AI_AddReg.png (20.91KiB)Viewed 3181 times
I have not found a way to add that parameter to the (default) node of the registry key. Note that the executable file is a property, for example, "[#MiFile.exe]" so it is not that trivial by just hardcoding the path together with the parameter.

By the way, I am creating a new protocol handler, such as Zoom does with zoommtg://. This is NOT an extension association.

Thanks
Jaime

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to add parameter to Data in Registry Value Editor

Mon Nov 02, 2020 6:42 pm

Hello Jaime,

I apologize for my last response, it looks like I have misunderstood your question.

In this case, I believe you should simply add the required parameter after adding the path to your executable file, e.g.:
parameter.png
parameter.png (128.19KiB)Viewed 3159 times

Have you tried the above and it is not working as expected?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”