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:
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!
if exist "%SYSTEMROOT%\sysWOW64\regsvr32.exe" (
echo Target machine is 64-bit...
REM use 32-bit executables for compatibility with 32-bit Office/Access!
) else (
echo Target machine is 32-bit...
%REGEXE% IMPORT \\myserver\myapplication\redist\HKCU_iGrid500_10Tec.reg
%REGEXE% IMPORT \\myserver\myapplication\redist\HKCU_vbalIml240_10Tec.reg
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!
Edited by moderator
| Reason: Igor/10Tec: Fixed broken attachment links and reuploaded them as .reg files