There is a way to register iGrid (in fact, any ActiveX control) without admin-privileges.
The required registration of ActiveX controls is expected to be visible in the CLSID, Interfaces and Typelib subkeys of HKEY_CLASSES_ROOT. It's commonly known that HKEY_CLASSES_ROOT ist just a shorthand for HKEY_LOCAL_MACHINE\SOFTWARE\Classes\. What's much less common knowledge is that HKEY_CURRENT_USER\SOFTWARE\Classes\ is
ALSO mapped to HKEY_CLASSES_ROOT.
The regsvr32 method above uses admin privileges to write the entries to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\. With some registry snapshot/compare tool (Active Registry Monitor, for example), you can easily get a .reg-file of the keys that regsvr32 produces on a reference machine when you register the control (iGrid) for the first time. By replacing HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER in that file, you get a .reg-File that any user can apply and that give him a working registration of the control!
After that, you only have to make sure the control will be installed to the same location on all machines as that location is referenced by the registration in many places. We usually do that by providing an installation script that basically just copies the required OCXs to a specific location on C: and then uses "reg import" to write the prepared .reg file to the HKEY_CURRENT_USER. The registration will work only for that single user, so every user-account on that machine has to repeat the install but it doesn't require admin rights. (Yay!)
On 64-bit Windows, take care to use something like the following in your batch-file, so it uses the correct path to the
32-bit (!!!) version of the registry-tools:
if exist "%SYSTEMROOT%\sysWOW64\regsvr32.exe" (
echo Target machine is 64-bit...
REM use 32-bit executables for compatibility with 32-bit Office/Access!
set REGEXE=%SystemRoot%\SysWOW64\reg.exe
) else (
echo Target machine is 32-bit...
set REGEXE=%SystemRoot%\System32\reg.exe
)
%REGEXE% IMPORT \\myserver\myapplication\redist\HKCU_iGrid500_10Tec.reg
%REGEXE% IMPORT \\myserver\myapplication\redist\HKCU_vbalIml240_10Tec.reg
The following is tested to work with MS Office 2003 / 2007, specifically Access and Excel. It is currently unclear if this will work for VB6!I have attached the files we currently use for that. Follow these steps to get the registration:
- Download the attached files
- rename the files to .reg (the forum doesn't allow .reg-Files)
- MODIFY the file's contents to match your location of the OCXs (or it WILL NOT WORK!)
Just replace the part "C:\\SWEP\\Common\\iGrid\\" with the ocx-location on your systems. Please note the double-slash that separates the directories!
- Use the code above in a batch-file to do the registration. Make sure you change the paths of the .reg-files accordingly.
Also note that the files are for the version 5.0 of iGrid and version 2.40 of the vbalImgList. For other versions of the control, you have to create the registry diff yourself as the CLSIDs and Version numbers will be different and maybe even the number of entries!
HKCU_iGrid500_10Tec.reg
(38kb) downloaded 310 time(s).
HKCU_vbalIml240_10Tec.reg
(11kb) downloaded 193 time(s).
Edited by moderator
2015-07-01T10:38:39Z
|
Reason: Igor/10Tec: Fixed broken attachment links and reuploaded them as .reg files