Windows Vista addin problem.

F

Fima Furman

I just discovered that my custom toolbar which works under Outlook
2000-2003 in XP/2000 does not appear under Windows Vista. I would
appreciate any pointers.
 
D

Dmitry Streblechenko

Did you check that you set the required registry entries?
If your addin installs itself in HKLM/HKCR instead of HKCU, the registration
will fail if the current user does not have suffiient rights (as is the case
with the UAC enabled in Vista)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
F

Fima Furman

Dmitry,

here's an example of my registry settings for a MSProject addon which
has the same problem.
I am testing in administrator account:


HKCR
{
XXAddOn.XXProjectAddOn.1 = s 'XXProjectAddOn Class'
{
CLSID = s '{xxxxxxxxxxxxxxxxxxxxxxxxxxxxx}'
}
XXAddOn.XXProjectAddOn = s 'XXProjectAddOn Class'
{
CLSID = s '{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}'
CurVer = s 'XXAddOn.XXProjectAddOn.1'
}
NoRemove CLSID
{
ForceRemove {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} = s 'XXProjectAddOn
Class'
{
ProgID = s 'XXAddOn.XXProjectAddOn.1'
VersionIndependentProgID = s 'XXAddOn.XXProjectAddOn'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'TypeLib' = s '{xxxxxxxxxxxxxxxxxxxxxxxxx}'
}
}
}

HKCU
{
Software
{
Microsoft
{
Office
{
'MS Project'
{
Addins
{
'XXAddOn.XXProjectAddOn'
{
val FriendlyName = s 'MyCompany MS Project Addin'
val Description = s 'ATLCOM Project Addin'
val LXXdBehavior = d '00000003'
val CommandLineSafe = d '00000000'
}
}
}
}
}
}
}

Thanks for your reply,

Fima.
 
D

Dmitry Streblechenko

Try to replace the HKCR part with the following (it will use
HKCU\Software\Classes instead of HKCR)

HKCU
{
Software
{
Classes
{
XXAddOn.XXProjectAddOn.1 = s 'XXProjectAddOn Class'
{
CLSID = s '{xxxxxxxxxxxxxxxxxxxxxxxxxxxxx}'
}
XXAddOn.XXProjectAddOn = s 'XXProjectAddOn Class'
{
CLSID = s '{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}'
CurVer = s 'XXAddOn.XXProjectAddOn.1'
}
NoRemove CLSID
{
ForceRemove {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} = s 'XXProjectAddOn
Class'
{
ProgID = s 'XXAddOn.XXProjectAddOn.1'
VersionIndependentProgID = s 'XXAddOn.XXProjectAddOn'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'TypeLib' = s '{xxxxxxxxxxxxxxxxxxxxxxxxx}'
}
}
}
}
}

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
F

Fima Furman

Dmitry, I tried this in both cases the Dll registers successfully,
however the Toolbar does not appear in Outlook/Project under Vista. I
guess my only option is to try to install development environment and
debug this in Vista. If anybody has any clues, I would really
appreciate any input.

Many thanks,

Fima.
 
K

Ken Slovak - [MVP - Outlook]

All my addins usually install in HKCU and use either self-registering
classes like Redemption or use VSTO or C# and they all show the correct
toolbars in Vista as well as in all other OS's.
 
D

Dmitry Streblechenko

Do you see the expected COM registry values in HKCU\Software\Classes and
Outlook specific ones in HKCU\Software\Microsoft\... ?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
D

Dmitry Streblechenko

Which means Outlook could not load the add-in. How about the other registry
entries?
Can you create and run a VBS file with the following script:

set Obj = CreateObject("XXAddOn.XXProjectAddOn")
MsgBox TypeName(Obj)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
F

Fima Furman

Which means Outlook could not load the add-in. How about the other registry
entries?
Can you create and run a VBS file with the following script:

set Obj = CreateObject("XXAddOn.XXProjectAddOn")
MsgBox TypeName(Obj)

Yes, sorry for a late reply. This worked.
Interestingly enought, I created a C# VSTO addon for Outlook and it
fails exactly the same way changing the LoadBehavior and this only
happens under Vista!
 
D

Dmitry Streblechenko

That makes sense: the HKCU entries were successfully created, but they
pointed to the non-existent HKCR entries, hence Outlook could not load the
add-in an disabled it.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
F

Fima Furman

That makes sense: the HKCU entries were successfully created, but they
pointed to the non-existent HKCR entries, hence Outlook could not load the
add-in an disabled it.

I am sorry, I am not sure I understand, Could you give some pointers
on how to fix this for Vista?
 
F

Fima Furman

That makes sense: the HKCU entries were successfully created, but they
pointed to the non-existent HKCR entries, hence Outlook could not load the
add-in an disabled it.

HKCR entries were also successfully created.
 
D

Dmitry Streblechenko

Are you saying it still does not run even after the add-in was registered
successfully? That means something else is going on in your add-in, you
really need to debug it under Vista.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
F

Fima Furman

Dmitry,

I finally debugged it under Vista, and indeed the problem was related
to the fact that the Addin dll was creating some CFiles in the
installation directory. I suppose Vista does not allow this and hence
the add-on was crashing. Sorry to take your time debugging this and
thanks for all your help. I now need to figure how how to modify the
behavior so that the files are created successfully.
 
D

Dmitry Streblechenko

It is never a good idea to do anything but read files from the Program Files
directory. You need to use either user or app data folders in Documents and
Settings folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top