We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

Install Add-on without admin rights

pagliu96
Contributor

Hello everybody, I'm developing an Add-on for Archicad in C++, and I would like to have an installer that doesn't require the admin rights (currently I'm using WiX installer).

I've set the rights perUser, and using also the LocalUser registry key for the installation.

 

I've moved also the installation path to LocalAppData folder, this removes the usage of the admin rights, but now the issue is that the user has to manyally change the Adds-on folder through the Adds-on Manager. I would like to avoid this, I would like that the add-on would be accessibile right after the installation (permission-free).

 

Is it possible to createa sort of link between the LocalAppData and Archicad?

 

Thanks in advance guys!

5 REPLIES 5
Miha Nahtigal
Advocate

Yes, it is possible. Installer should prompt your user for a target installation folder.

 

After that add a new registry string with your plugin path in HKCU\Software\GRAPHISOFT\ARCHICAD\Archicad 27.0.0 INT R1\Add-On Manager\Include

 

Addon location/folder should be formatted sth like 'lan.flat:///your/install/path/yourpluginname.apx'

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.
pagliu96
Contributor

Thanks for the answer Miha!

This method implies that the user is selecting the instsallation path or it is possible to just use AppData folder for doing that (I would like to use that).
And after I've the installation folder (appdata), I've to set a registry key for linking it to the add-on manager right?

Thanks a lot, I'm going to give it a try 🙂

Miha Nahtigal
Advocate

Yes, you can also use AppData.

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.
pagliu96
Contributor

Okay I don't know why, but the key are correctly present in the registry. It actually finds the Add-on in Archicad, but when I run it it complains that it can't find the cefsimple.exe

pagliu96_0-1716277948484.png

I think the issue is related to some wrong path setup in the WiX installer.

Edit: 

Yes I solved it, it was searching for the cefsimple.exe file in the wrong path, now I've moved to the LOCALAPPDATA env path and it works as before.

 

Thanks for everything!

pagliu96
Contributor

Hello again, I've to ask another thing about this topic, since I'm having some troubles.

pagliu96_0-1716469824299.png

 

So, I've add a new string name cointaining the .apx plugin file, after that I've increased the "Include Number" string value of 1. This worked and allow me to use the plugin once Archicad runs in my current installation context of the plugin.

 

But I've tried with a new Archicad installation, it creates correctly the keys "Add-On manager" and "Include" in the case they were missing, but this doesn't allow Archicad to find the plugin once the software runs.

 

What solved this was manually open the Adds-On Manager dialog from the software and and changing the "Actual Path" (in the Registry) to the plugin path in the LocalAppData folder. Then close and re-open and change again the Actual Path to default value (Program Files folder).

pagliu96_1-1716470326957.png

This "fixed" the software and now when I remove the plugin and install again it works.

 

This is making me thinking that I'm missing some operations to do before setting the path. Are there any API call that I should use or something that I'm missing?

If you want I can attach you the CustomAction code for the WiX installer that adds the Registry Key of the plugin.