The way that MSI provides to record an install location (typically the
main application folder) is that you add a type 51 custom action to set
ARPINSTALLLOCATION to that property (like INSTALLDIR) once it's cast in
concrete. Then you can use things like Installer.ProductInfo
(ProductCode, "InstallLocation") to get that location on an uninstall,
or indeed from any app that wants to use the automation interfaces or
call MsiGetProductInfo (...INSTALLPROPERTY_INSTALLLOCATION) to find it. 

Phil Wilson 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Dimmick
Sent: Tuesday, September 19, 2006 9:18 AM
To: Anirban Basu; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] FW: issue around INSTALLDIR


For your problem you could simply use a <ComponentSearch> to find the
component that contains the assembly. Still, I don't like the idea of
registering the component using regasm, it still seems far too fragile.
 
-- 
Mike Dimmick

________________________________

From: Anirban Basu [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2006 15:27
To: Mike Dimmick; [EMAIL PROTECTED]
Subject: RE: [WiX-users] FW: issue around INSTALLDIR



Hi Mike,

Thanks for the reply.

I agree that the approach may not be a good one, but we are not in a
position to change it.

 

Moreover my question is not around what is the best practice (I know
what is described here is not the best practice), but my question is as
follows
Are users not supposed to use the "INSTALLDIR" variable in their custom
actions?

But this is a windows installer variable (supposed to set by the windows
installer service itself) and it should be safe to use it. 
My observation is that the msi is removing all the dll and registry
entries it has installed so I assume that the non-default installation
directory is available to windows installer service somewhere but it is
not passing it in the INSTALLDIR.

Have any one of you faced similar kind of problem? Why is it happening?

Take Care

Anirban 

 

________________________________

From: Mike Dimmick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 19, 2006 7:18 PM
To: Anirban Basu; [EMAIL PROTECTED]
Subject: RE: [WiX-users] FW: issue around INSTALLDIR

Why do you have to register this assembly? Is BizTalk calling back into
this assembly via COM Interop? Is it simply that you're trying to call
the Custom Action implemented in the .NET DLL from VBScript? Frankly,
that's messy.

Do it properly: write your custom action as a 'flat' C++ DLL, then you
won't be polluting the user's system with an otherwise-useless COM
object.

 
If you must do it, use the correct Windows Installer mechanisms for
registering COM objects: the Class and Typelib tables. See Rob's blog
entry at http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx.

-- 

Mike Dimmick

 Anirban 

 _______________________

From: Anirban Basu 
Sent: Monday, September 18, 2006 6:28 PM
To: Rob Mensching; Cullen Waters; Windows Installer XML
Subject: RE: issue around INSTALLDIR

 

Hi,

Thanks for your responses.


Rob, probably it is not possible to do away with the custom action. I am
giving you more details on this.

The custom action registers a dll which is copied to the installation
directory. The dll is a .NET assembly. Then it calls "Install" and
"Uninstall" method within the assembly which does specific actions.
(like making BizTalk WMI calls etc.).

I agree that storing the installation directory specifically into the
registry is an option, but is it what all users of WIX are supposed to
do? Does WIX not handle the modified installation directory? 

I agree that if I do not store modified installation directory somewhere
it is not possible for WIX to identify the installation directory. But
what I want to know is that from where WIX reads this value of
"INSTALLDIR"?


Your help is much appreciated.

 

Take Care

Anirban 
________________________________

From: Rob Mensching 
Sent: Saturday, September 16, 2006 3:17 PM
To: Cullen Waters; Anirban Basu; Windows Installer XML
Subject: RE: issue around INSTALLDIR

Or better yet, quit calling your CustomAction.  Something sounds very
fishy in this design.  More details about what you are doing in the
CustomAction are probably necessary to really provide useful
information.

From: Cullen Waters 
Sent: Friday, September 15, 2006 09:58
To: Anirban Basu; Windows Installer XML
Subject: RE: issue around INSTALLDIR


Other users have reported that you have to save the modified
installation directory value during install somewhere(like the
registry).
 
Then, on untinstall/reinstall/modify, do a regsearch to get the value of
the key you created, and change INSTALLDIR to that value.

Make sense?

From: Anirban Basu 
Sent: Friday, September 15, 2006 7:50 AM
To: Windows Installer XML
Subject: issue around INSTALLDIR
Importance: High
Hi,

I am running into a very severe issue. I may be having some problem in
my setup.wxs file but really not being able to debug it. The issue is as
follows.

 
We have a very simple setup, which during setup registers an assembly
(for custom action) and calls its methods.

If the installation directory of the product is changed to something
else from the default installation directory, the installation gets
through properly. Actually in this case "INSTALLDIR" is changed properly
to the value of the installation directory that user has selected.

During un-installation the variable "INSTALLDIR" takes the default value
and never changes to what user has selected during installation. So
during un-installation the registration of the custom action assembly
fails. Hence the un-installation fails.

I can not find what from where windows installer is setting "INSTALLDIR"
to default installation directory. Is using the "INSTALLDIR" property
reliable? Do I need to set "INSTALLDIR" explicitly?

Can somebody please tell me whether it is the expected behavior?

Please reply ASAP. We are badly stuck in this issue. Any help will be
appreciated.
Microsoft India R&D Pvt. Ltd.

        God is good.

        
Anirban Basu
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
        

Add me to your address book...
<https://www.plaxo.com/add_me?u=17180543743&v0=1327783&k0=1917013165> 

        Want a signature like this? <http://www.plaxo.com/signature> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to