PCAN Explorer 5 AddIn Installer

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
PCANUser
Posts: 26
Joined: Fri 14. Dec 2012, 10:40

PCAN Explorer 5 AddIn Installer

Post by PCANUser » Wed 13. Aug 2014, 15:56

Hello,

I developed an add-in for internal use and it works fine but the installation process is not easy (copy files to Addins folder and run PCAN Explorer as admin etc).

Can you provide any hints how to create an installer for an add-in? It appears that entries need to be made in the HKEY_CLASSES_ROOT and HKEY_CURRENT_USER areas. Can this be done via an installer?

Thanks in advance,
Richard

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: PCAN Explorer 5 AddIn Installer

Post by K.Wolf » Thu 14. Aug 2014, 16:32

Hi,

yes the Add-in installation can be done via a separate installer.

You're right, the Add-in creates keys under HKEY_CLASSES_ROOT, and in every user account under HKEY_CURRENT_USER.
The keys unter HKEY_CLASSES_ROOT are created through the Add-in itself. During the registration process, PCAN-Explorer calls the "DllRegisterServer" DLL function, which is one of the 4 functions every In-process COM server exports. To get access to this part of the registry, your installer must run "As Administrator".
The installer can either load the DLL itself and call the exported DllRegisterServer function, or it can use the regsvr32.exe utility, which is located under \Windows\System32. Command line e.g regsvr32.exe c:\<Path>\MyAddIn.dll /s

The second part is to tell PCAN-Explorer that a new Add-in is in the AddIns directory. Usually, this is checked when you open the Add-in Manager dialog box of PCAN-Explorer. An installer can write a special registry value that is checked when the application is started. If PCAN-Explorer sees this value, it checks for new Add-ins and shows the typical message "Checking for new Add-ins..." when starting. No further actions are required, the newly found Add-in is then loaded automatically.
For this, the installer must create the following registry value:

[HKEY_CURRENT_USER\Software\PEAK-System\PCAN-Explorer\5.0\AddIns]
"CheckNew"=dword:00000001

PCANUser
Posts: 26
Joined: Fri 14. Dec 2012, 10:40

Re: PCAN Explorer 5 AddIn Installer

Post by PCANUser » Thu 14. Aug 2014, 17:58

Thanks very much for the comprehensive reply. I will have a go at this and see how far I get!

Thanks,
Richard

Post Reply