Bug in microsof addin manager including SR-2a 
Author Message
 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.



Wed, 01 Aug 2001 03:00:00 GMT  
 Bug in microsof addin manager including SR-2a
This is a known bug that has existed in the add-in manager since Access
95... and was never discovered until after Access 97 shipped.

It has been fixed in Access 2000, but since the "|LIBDIR" token has never
been documented, it was not felt necessary to create a KB article to doc a
bug that does not exist in anything that Access supports.

It would be a great feature request.... but the bug has been fixed for
Access 2000 and the token is STILL not doc'ed.

Michael


Quote:
> 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\LoadOnStartu
p

- Show quoted text -

Quote:

> 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.



Thu, 02 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How do I get a VB5 AddIn DLL in the Addin Manager

2. Sr. Web Architect/project manager

3. Sr. Web Architect/project Manager

4. FYI: OLE bug in Visio 2000 SR 1

5. VB6 created add-in not showing up in VB5 AddIn Manager

6. Stressed out with Addin manager

7. Please Help with Wizard Manager Addin

8. Please Help with Wizard Manager Addin

9. My Addin Manager has Disappeared

10. SR-1 and SR-2

11. Detecting SR-1 and SR-2?

12. Microsof Access Controls

 

 
Powered by phpBB® Forum Software