It sounds like you need the SourceDir property.
http://msdn.microsoft.com/en-us/library/aa371857(VS.85).aspx

This isnt where its being run from, rather its where the msi is, which
sounds more like what you need.

Since the ResolveSource action is required to set the value of the
property, you have to add 
<ResolveSource After="CostInitialize">not Installed</ResolveSource>
to your sequence.

Your custom action will need to be scheduled anywhere after
ResolveSource.

The "not installed" condition is to prevent the user being asked for the
CD during removal, repair, etc.
Read this on why resolvesource isnt ideal and ways to get around it. If
you arent trying to produce a professional quality installer, you might
not be too worried.
http://blogs.msdn.com/heaths/archive/2007/10/25/resolvesource-requires-s
ource.aspx



-----Original Message-----
From: Andrew Macvean [mailto:mad_man_...@hotmail.com] 
Sent: 13 August 2009 15:36
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Runtime location of the MSI


Hi there,

 

As stated on another thread my installer must run some external .exe if
certain prerequisites are not met. I have managed to get this working
correctly (thanks again everyone) by specifying the directory where
these .exe are currently stored on my pc.

 

However in practice the installer will be distributed by CD, and the
.exe will also be stored on this CD along with MSI.

 

So my question, is there such a property to establish the current
directory of the installer? i.e. where it is being run from? 

 

As the user may have various CD drives I dont think the best bet would
be to hard code anything.

 

Any suggestions?

 

Thanks in advance

Cheers

_________________________________________________________________
Windows Live Messenger: Happy 10-Year Anniversary-get free winks and
emoticons.
http://clk.atdmt.com/UKM/go/157562755/direct/01/
------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on what you do best, core application coding. Discover what's
new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.  
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to