Verbose log file will tell you.  Very possible something will surprise you.

-----Original Message-----
From: Andrew Kendall [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 03:16
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] My installer seems to be ignoring a property set 
inside Custom Action dll

Ok thanks Rob, but can you see what is wrong with my wxs that is causing the 
uninstall to leave the fred.txt file hanging around? Thanks again for your 
time, much appreciated.

Regards,
Andrew


----- Original Message ----
From: Rob Mensching <[EMAIL PROTECTED]>
To: General discussion for Windows Installer XML toolset. <[EMAIL PROTECTED]>
Sent: Friday, 17 October, 2008 10:49:52
Subject: Re: [WiX-users] My installer seems to be ignoring a property set 
inside Custom Action dll

Recache-reinstall a fixed MSI.

msiexec /fv fixed.msi

Then you can uninstall.

-----Original Message-----
From: Andrew Kendall [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 02:15
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] My installer seems to be ignoring a property set 
inside Custom Action dll

Rob, thank you! My CustomAction now scheduled after ValidateProductID and it 
works.

However, when I uninstalled it (msiexec /x fred_setup.msi), it removed fred.exe 
but left fred.doc. I think this maybe because I need to and "AND NOT Installed" 
to my condition. Right?

But right now, I can't uninstall it using "Add or Remove Programs". How do I 
get rid of this install?



----- Original Message ----
From: Rob Mensching <[EMAIL PROTECTED]>
To: General discussion for Windows Installer XML toolset. 
<wix-users@lists.sourceforge.net>
Sent: Friday, 17 October, 2008 9:40:44
Subject: Re: [WiX-users] My installer seems to be ignoring a property set 
inside Custom Action dll

MSI SDK notes that the FeatureCondition table is evaluated at CostFinalize.  
Your CustomAction is scheduled after CostFinalize... a little late, I think.  
<smile/>

-----Original Message-----
From: Andrew Kendall [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 01:29
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] My installer seems to be ignoring a property set inside 
Custom Action dll

Hi All,

Here is a simple Product.wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Product
Id="{BEC8D2EB-A59C-4D72-8CBB-3DC35FA8C8E2}"
UpgradeCode="{2FAAAB9D-E0BF-4AD8-B41B-22A78AF79326}"
Name="FredProgram" Language="1033"
Version="1.0.0.0" Manufacturer="Freds Computing Services">
    <Package Id="*"
Description="Freddie" InstallerVersion="200"
Compressed="yes" />

    <Media Id="1"
Cabinet="Product.cab" EmbedCab="yes" />

    <Property
Id="MYPROP">0</Property>

    <Directory
Id="TARGETDIR" Name="SourceDir">
      <Directory
Id="ProgramFilesFolder">

<Directory Id="INSTALLDIR" Name="FredSoft">


<Component Id="FredAppFile"
Guid="{59CB9547-E5CA-49FA-814F-248716487E54}">

<File Id='fred_exe' Name='fred.exe' DiskId='1' Source='C:\fred.exe'
Vital='yes' />

</Component>

<Component Id="FredDocFile"
Guid="{803BBE51-9B42-410B-A9A8-C4E64E03221E}">

<File Id='fred_txt' Name='fred.txt' DiskId='1' Source='C:\fred.txt' />

</Component>


</Directory>
      </Directory>
    </Directory>

    <Feature
Id="FredApp" Title="Fred Application"
Level="1">
      <ComponentRef
Id="FredAppFile" />
    </Feature>

    <Feature
Id="FredDoc" Title="Fred Document" Level="0">
      <ComponentRef
Id="FredDocFile" />
      <Condition
Level="1">MYPROP = 1</Condition>
    </Feature>

    <CustomAction
Id='CheckSystem' BinaryKey='CheckSystem' DllEntry='CheckSystem' />

    <InstallUISequence>
      <Custom
Action='CheckSystem' After='CostFinalize'>NOT Installed</Custom>
    </InstallUISequence>

    <Binary Id='CheckSystem'
SourceFile='FredInst\FredInst.dll' />

  </Product>

</Wix>



Here is some VC++ code to create the FredInst.dll:

Fred.h

#ifndef
AFX_ATRINST_H__551D5579_9FC9_4CCD_A568_A963C839F6B8__INCLUDED_
#define
AFX_ATRINST_H__551D5579_9FC9_4CCD_A568_A963C839F6B8__INCLUDED_

// Make our life easier, if DLL_EXPORT is defined
in a file then DECLDIR will do an export
// If it is not defined DECLDIR will do an import
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif

#ifndef _AFXDLL
#define _AFXDLL
#endif

#include <iostream>
#include <afx.h>
#include <msi.h>
using namespace std;

extern "C" DECLDIR UINT
CheckSystem(MSIHANDLE);

// End the inclusion guard
#endif


Fred.cpp:

// DECLDIR will perform an export for us
#define DLL_EXPORT

// Include our header, must come after #define
DLL_EXPORT
#include "Fred.h"
#include <msiquery.h>

MSIHANDLE hMsi;

extern "C" DECLDIR UINT
CheckSystem(MSIHANDLE hMsi)
{
    MessageBox(NULL,
_T("Hello"), _T("CheckSystem"), MB_OK);
    MsiSetProperty(hMsi,
_T("MYPROP"), _T("1"));
    return ERROR_SUCCESS;
}


The problem I'm having is that although the MYPROP property is
being set ok from the DLL (which the install log confirms), theFredDoc feature
is not being installed, implying that its Level is not being changed to 1.

Can anybody please help me out here? Many thanks
for your time and attention.

Regards,
Andrew Kendall

Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF..Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to