Author Topic: un/re-install plugin on AutoCAD un/re-install  (Read 2311 times)

0 Members and 1 Guest are viewing this topic.


  • Newt
  • Posts: 127
un/re-install plugin on AutoCAD un/re-install
« on: August 15, 2023, 01:50:50 PM »
I use NSIS for my installer. I have plugin installers that go through the registry and update the AutoCAD profiles to set the trusted paths to my plugins.

When AutoCAD is un/re-installed, these registries get reset to default. How do I un/re-install my plugins when AutoCAD gets un/re-installed so as to set the proper registry values and files?

For further clarity, uninstall my plugins when AutoCAD is uninstalled.
Reinstall my plugins when AutoCAD is reinstalled.


  • Water Moccasin
  • Posts: 1883
Re: un/re-install plugin on AutoCAD un/re-install
« Reply #1 on: August 15, 2023, 02:43:13 PM »
using Win = Microsoft.Win32;

Win.RegistryKey key = Win.Registry.CurrentUser;
            key = key.OpenSubKey(Keypath,true);
            if (key == null)
                key = Win.Registry.CurrentUser;
                key = key.CreateSubKey(Keypath);
                key.SetValue("DESCRIPTION",(string)"x dll autoload",RegistryValueKind.String);
                key.SetValue("MANAGED", 1, RegistryValueKind.DWord);
                key.SetValue("LOADER",(string)@"C:\Program Files\Autodesk\" + AcadVer +  @"\Support\LexStartup.dll",RegistryValueKind.String);

You can set reg keys something like this