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
PCAN Explorer 5 AddIn Installer
Re: PCAN Explorer 5 AddIn Installer
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
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
Re: PCAN Explorer 5 AddIn Installer
Thanks very much for the comprehensive reply. I will have a go at this and see how far I get!
Thanks,
Richard
Thanks,
Richard