Hey all,

I'm trying to implement handling for major upgrades for a web application
installation. 

The use case I'm currently testing is:
1. User installs v1.0.0 of the application
        - Install gathers information about the virtual
          directory and database server
        - App is installed, vdir created, db created,
          web.config is updated with connection string
          and encrypted

2. User installs v1.0.1 of the application
        - no prompts for virtual directory or database
          server (upgrading... should use existing
          vdir and db).
        - Old version is removed as part of the install.

The challenge I'm facing is the web.config file... I _need_ to keep the
current version from the v1.0.0 install.

So... I've decided that during Uninstall, if uninstalling because of a
backup, a backup of the web.config file will be made (filesystemobject
copyfile). This isn't working out at all... the CA seem to get the TARGETDIR
property.

Here's the backup CA definition:
<CustomAction 
    Id="BackupWebConfig" 
    Return="check" 
    Execute="deferred"
    Impersonate="yes" 
    BinaryKey="Callwebconfig" 
    VBScriptCall="Backup" 
/>

<CustomAction 
    Id="SetCAP_BackupWebConfig" 
    Property="BackupWebConfig" 
    Value="[TARGETDIR]" 
/>

Here's the relevant InstallExecuteSequence entries:

<Custom Sequence="265" Action="SetCAP_RestoreWebConfig" />

... snip ...

<InstallInitialize Sequence="1500" />
<RemoveExistingProducts Sequence="1550" />
<Custom Action="BackupWebConfig" Sequence="1555">
  REMOVE="ALL" AND UPGRADINGPRODUCTCODE
</Custom>


In the VBScript I have the following debug messages:

msgbox "CustomActionData: " & Session.Property("CustomActionData")
msgbox "TARGETDIR: " & Session.Property("TARGETDIR")

Both of which display empty strings!


So... from my point of view... it looks like an uninstall that is initiated
by RemoveExistingProducts doesn't quite operate like a normal uninstall...
but that doesn't make much sense.

Anyone have any suggestions?

Regards,

Rob 




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to