KB suggestion - install script

D

David Thielen

I strongly encourage that someonw rite a KB article on the following:

Give user’s specifics as to what needs to be done (and not done) in the
install script. This is needed for people who want to use an installer other
than Visual Studio’s installer. Again, what is needed to successfully install
should not be "magic" as that leaves the developers unable to insure they are
doing everything correctly.

thanks - dave
 
F

Felix Wang

Hi Dave,

Thanks for your suggestion. Could you elaborate a little bit more on the
issue?

1. When you mentioned "install script", did you mean the VBScript or
JScript based custom action in Windows Installer?

Scripts
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/s
cripts.asp

2. As far as I know, some of the installation related problems can be
environment specific. It is natural that sometimes the installation may
fail. Do you have any suggestion on how we can ensure that a successful
installation is not "magic"? In particular, do you have any specific
example on any improvements we can make?

We always appreciate any comments and suggestions from our end-users. I
look forward to hearing from you.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
D

David Thielen

Hi;

I mean for the complete install script as create in Visual Studio or Install
Shield or another installer. Here's the big things I have hit:
1) If the shim fails, there is no way to figure out why (usually this is not
an installer issue).
2) What registry settings are needed, voth if you have a shim and if you do
not have a shim.
3) What reference files need to be in the install and which do not (like the
Office 2003 PIAs).
4) How items are supposed to be registered.

thanks - dave

ps - I think the Visual Studio is a really powerful installer but is pretty
hard to figure out how to do anything custom with it.
 
P

Peter Huang

D

David Thielen

Hi;

Yes, I've read that a ton (and implemented it). But it doesn't answer things
like:

1) If the shim doesn't work, why isn't it working (bad registry setting, not
strongly named managed assemblies, mismatched GUIDs, etc.)
2) It does not explain the registry settings. And if you just follow the
article you end up with a) too much in the registry, and b) no way to let the
install select install for all vs just me.
3) What reference files are needed in the installer.
4) etc.

The bottom line is that there is a lot of info you need to make sure you are
coding and installing an add-in correctly that just does not exist.

thanks - dave
 
P

Peter Huang

Hi

Comments in line.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: KB suggestion - install script
thread-index: AcTBurElG3vhm0GjTRu1eQZRBj7nYQ==
X-WBNR-Posting-Host: 199.45.247.98
From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <[email protected]>
References: <[email protected]>
<1FP4PC#[email protected]>
Subject: RE: KB suggestion - install script
Date: Wed, 3 Nov 2004 07:35:05 -0800
Lines: 40
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.office.developer.com.add_ins
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.office.developer.com.add_ins:7070
X-Tomcat-NG: microsoft.public.office.developer.com.add_ins

Hi;

Yes, I've read that a ton (and implemented it). But it doesn't answer things
like:

1) If the shim doesn't work, why isn't it working (bad registry setting, not
strongly named managed assemblies, mismatched GUIDs, etc.)

This may need troubleshooting.
e.g. use the regmon to monitor the registry, COM will load the com dll
based on the registry. We can monitor to see which steps failed.
After than we can use filemon to monitor the file, because after the COM
located the dll, he needs to load the com dll file, we can troubleshooting
if the load is successful.
If that still did not work, we need to set breakpoint in the code to do the
debug.
2) It does not explain the registry settings. And if you just follow the
article you end up with a) too much in the registry, and b) no way to let the
install select install for all vs just me.

The shim wizard will generate a standard ATL project for us, you may read
the .rgs file to see what it happen in the registry.
Also you may try to generate two atl projects, one for all user and one for
current user, so that you will know the difference

3) What reference files are needed in the installer.
Commonly the shim dll and the managed dll is needed. But to work the code
we need another basic service.
e.g. we must need .net framework to host the managed dll.
 
D

David Thielen

Hi;

Ok, I give up on this one. (But with no KB article you are going to continue
to get lots of questions from people asking for help each time they hit
problems - and most will hit these problems.)

So, no you didn't answer this question - but I don't think you can.

- dave
 
Y

Yan-Hong Huang[MSFT]

Hello Dave,

I reviewed the whole thread. Based on my understanding, currently you are
using Shim to create addins for Office XP. However, you are not sure of the
internal things in how Shim works. So you have questions on registry keys,
dependency DLLs, and etc. Right?

To answer this question, I think we first need to go through why we need
shim under this situation. Deploying and installing a managed COM add-in
securely in Microsoft Office XP currently requires the assembly be hosted
in an unmanaged COM add-in proxy component called a shim. For what a shim
is and why it is currently needed to deploy COM add-in DLLs, this KB aricle
is quite useful:
"Deployment of Managed COM Add-Ins in Office XP"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_ofshim.asp
(I know you have read it. But I still paste it here, maybe some other
community member can benefit from it. :))

OK, then let's continue on this topic.

VS.NET installer is a powerful tool, which will do most of things for you
and bring you convenience. However, as a coin has two sides, using it may
hide some internal things from developers so sometimes we may feel confused
on the errors.

In order to dig into it, we may need to check into that ATL shim project.
As Peter mentioned, the rgs file contains info that shim ATL project writes
to registry. Also, that ATL project does some thing such as regsvr32 so
that when runnning it, the shim will be registered automatically.

When deploying this type of solution, it is important to keep in mind that
all assemblies and the shim DLL need to be placed in the same directory on
the target machine. Then the shim needs to be self-registered using
regsvr32. I think that is the main work that VS.NET installer project does.
Also, you can refer to this step by step sample for more details:
"Using the COM Add-in Shim Solution to Deploy Managed COM Add-ins in Office
XP"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_comshim.asp

Unfortunately, there is no public document on how to do it step by step
like a install script. So we may still need to dig into project code, and
some materials for the internal info. Troubleshooting is a time consuming
work. But please feel free to post here or contact Microsoft PSS when you
need assistance from us. We are glad to be of assistance.

Thanks very much for your understanding.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Hi;

That is my point. I think you should create a KB article that goes through
all of this. I believe I understand this well now so I don't need such a KB
article. But there are a ton of add-in developers who do and it's a shame if
each of them has to spend days learning all of this because it is not
documented.

thanks - dave


:

....
 
P

Peter Huang

Hi

Thank you for your good feedback. I will pass it to our product group and
content development team and they will evaluate it to see if they will
create a KB article.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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