For option one: you require either some side-effect from the UI sequence OR
a public property that you can cryptographically (or otherwise) verify from
the execute sequence was correctly set from the UI sequence. Correct?

Side-effects that are not part of the installation transaction can have
unintended consequences and will need to be very well thought out. Depending
on what you do they could lead to inability to uninstall, denial-of-service,
inability to upgrade, or other issues.

Crypto verification could be thwarted by anyone with enough motivation to
dissect your code and discover your keys or other basis for validation. If
you could pull it off, or otherwise validate from your server "quickly" that
a key handle is valid (use the key handle instead of the key itself and
return the key handle as your public property for the execute sequence) that
would lead to a cleaner package that doesn't limit your other
choices/actions (and will probably be more robust and more secure as well).

For option two:

<Product...>
...
<Condition Message="Must use full-UI to install">Installed OR
UILevel=5</Condition><!--5 = INSTALLUILEVEL_FULL-->
[...]
</Product>


-----Original Message-----
From: Dan Giambalvo [mailto:danie...@microsoft.com] 
Sent: Friday, October 23, 2009 7:36 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Blocking install if property isn't set

So he problem here is that the CustomAction cannot be allowed to run twice.
It actually connects to a server, and decrements a server-side count.  So,
we only want to do that once per install.  So, the way I see it, I have two
options:
1) The UI Sequence runs the CA, and sets some *private* flag that cannot be
passed from the command line like KeyValid.  The InstallExecuteSequence
checks that that is valid, and then only runs the CA if it is not set based
on a public PRODUCTKEY flag.  The key here is that I need to be able to pass
that value from the UI to the Execute sequence, but it cannot be
command-line passable.  If it is, someone could just run the install
silently and pass KEYVALID="1". 
2) We somehow disallow silent installs completely.  We are completely 100%
fine with this, if there is some way to do it.  I would just want to be sure
silent uninstall is possible (for the upgrade scenario.) 

One might suggest we only run the CA in InstallExecute only, but that
doesn't work because we want a flow where we verify the key and the user has
a chance to correct it in the UI.  

-Dan 

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Friday, October 23, 2009 6:06 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Blocking install if property isn't set

You still validate it and fail the install if it doesn't pass that
validation.

If someone runs the MSI silently your UI never runs anyway. The commandline
is how they would pass what they would have typed into the UI.

-----Original Message-----
From: Dan Giambalvo [mailto:danie...@microsoft.com]
Sent: Friday, October 23, 2009 5:32 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Blocking install if property isn't set

If I make it public, can't someone just pass it in from the command line
then?  Doesn't that similarly defeat the purpose? 

-----Original Message-----
From: Blair [mailto:os...@live.com]
Sent: Friday, October 23, 2009 5:22 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Blocking install if property isn't set

If you have a custom action that validates your property and returns failure
if it doesn't validate, run that custom action as Execute="immediate" and
schedule it in both InstallUISequence AND InstallExecuteSequence (so it runs
up to twice). Make sure that the property you check is a "secure" property,
which means it also must be a "public" property, so that it can be passed
from the UI sequence to the execute sequence so it doesn't fail then.

Condition that action in both sequences on "NOT Installed" so it doesn't
block uninstalls/upgrades/repairs/etc.

-----Original Message-----
From: Dan Giambalvo [mailto:danie...@microsoft.com]
Sent: Friday, October 23, 2009 12:37 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Blocking install if property isn't set

Our installer has some UI which requests and validates a product key from
the user during InstallUISequence.  I want to add an additional checks so
that if some clever user tries to silently install our msi to bypass the UI
(and hence the validation UI) that they install will fail.  I have a private
property in the installer which I can check to know if we've successfully
validated a key, I'm just not sure how to make the entire InstallExecute
sequence contingent on it (and only so on clean installs, but not
uninstalls/upgrades/repairs/etc.)

I'm guessing there's a right way to do this.  Can anyone tell me what it is?

Thanks!
-Dan
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the
only developer event you need to attend this year. Jumpstart your developing
skills, take BlackBerry mobile applications to market and stay ahead of the
curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to