
Bug in microsof addin manager including SR-2a
Warning: The following describes a way to hang MS Access 97 Add-In
Manger. It has been tested with SR-2a in place.
The code for the Add-In wizard - as exhibited in the Access Developer's
Handbook CD-ROM - is designed to support both |ACCDIR\ and |LIBDIR\ in
the Value field of USysRegInfo. The |LIBDIR\ substitution is absolutely
necessary if the value of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\Access\Wizards\AddInPath
is not the same as the folder in which msaccess.exe resides.
Unfortunately in the class module for form wm_frmWizMan in WIZTOOL80
(the Add-In Manager) there is a classic cut and paste bug. The
consequence of this bug is that the form hangs during the initialization
process if |LIBDIR\ is included.
The code that i have is:
Private Function FProcessRegRecord(stKeyOrValue As String, lType As
Long, stValName As String, stValue As String, iOperation As Integer) As
Integer
...
Case 0
If iOperation = 0 Then
fRet = (0 = wlib_ErrWriteRegKey(hkey, stKeyOrValue, ""))
ElseIf iOperation = 1 Then
fRet = (0 = wlib_RegDeleteKey(hkey, stKeyOrValue))
End If
Case 1
While (InStr(stValue, WM_ACCDIRTOKEN))
wlib_ReplaceStr stValue, WM_ACCDIRTOKEN, Left$(stAccDir,
Len(stAccDir) - 1)
Wend
While (InStr(stValue, WM_LIBDIRTOKEN))
wlib_ReplaceStr stValue, WM_ACCDIRTOKEN, Left$(stLibDir,
Len(stLibDir) - 1)
...
the last line should be
wlib_ReplaceStr stValue, WM_LIBDIRTOKEN, Left$(stLibDir,
Len(stLibDir) - 1)
Interestingly enough i spotted this problem in reading the code before i
had the problem with the Add-In manager{*filter*}.
REQUESTS:
It would be very valuable to fix this bug and support |LIBDIR\. |ACCDIR\
is insufficient in environments, such as mine, where the AddInPath is
not equal to the Access directory.
It would be very valuable to support |LIBDIR\ in the ValName field of
USysRegInfo. Because of conditions peculiar to my corporate environment
i wrote my own version of the Add-In manager that installs my add-in in
c:\program files\product name\. Everything has been quite happy provided
that i added the full path to my startup as a value in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\Access\Wizards\LoadOnStartup
This would permit my users to both use my install process and the Access
Add-In manager.
WISH LIST:
It would me nice to have a check box in the Add New process for the
Add-In manager that would leave add-in in its original folder rather
than copying it too the AddInPath / Access folder.
|ACCDOR\ and |LIBDIR\ would then be interpreted as pointing to the
add-in's source folder. Or an additonal "macro" of |SRCDIR\ could be
provided. A flag in USysRegInfo might take the place of the checkbox.
Any add-in that was in LoadOnStartup should show up as installed.