On 11/19/2014 2:37 AM, jason.small...@bt.com wrote:
> I have looked more closely at the logs and if I try to open the file
> I want to change at the point Before=InstallFinalize, then the file
> does not exist. If I use After=InstallFinalize then I can open the
> file but I don't have permission to write it back to its folder in
> Program Files.
>
> Any idea what is the best sequence to do this kind of operation?

You have to do it as a deferred action. Evidently you're running a
per-machine install. after-finalize your permissions drop back to your 
normal user. During deferred, you're elevated.

What you need (minimally) is:
- immediate CA to set property
- deferred CA (do not impersonate) to modify
- (as someone else mentioned) a RemoveFile element to force removal on 
uninstall
(I said minimally, as this does not deal with rollback)

(btw: other ways I've seen this done is to install the config file, then 
make a copy for the user - then msi removes the config naturally and the 
users data is left behind)

Welcome to the wonderful and baffling world of MSI! I highly suggest:
- The Definitive Guide to Windows Installer, Phil Wilson (ISBN: 
1-59059-297-2)
- WiX: A Developer's Guide to Windows Installer XML, Nick Ramirez 
(https://www.packtpub.com/application-development/wix-36-developers-guide-windows-installer-xml)

The first really helped me understand MSI concepts. The 2nd helps 
understand WiX.

Dave

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to