A very simplistic way to do it would be to add a LaunchCondition to your MSI 
which the bootstrapper provides.
Something like
    <Condition Message="[ProductName] can only be installed using the 
executable. Exit and run the executable to 
install"><![CDATA[VALIDPRODUCTKEY]]></Condition>
In your MSI and something like
      <MsiPackage Id="mypackage" SourceFile="mypackage.msi" Compressed="no" 
Vital="yes">
        <MsiProperty Name=" VALIDPRODUCTKEY " Value="1" />
      </MsiPackage>
In your bundle should do it.

This is easily defeated by anyone who opens the MSI up using Orca/InstEd! but 
it'll stop the vast majority.

If you want to be really friendly to sysadmins who might want to push the MSI 
silently to their users, send the product key itself (as in change the 'Value' 
in the above example from "1" to the variable you use to store the entered 
product key) from bootstrapper to MSI & have the MSI add the registry entries 
or write the key file or whatever registration steps the application looks for 
(assuming your application does look for a valid product key & your entire 
licensing model doesn't depend on a single very easily defeated installation 
check).

Palbinder Sandher 
Software Platform Engineer 
T:   +44 (0)141 945 8500
F:   +44 (0)141 945 8501
http://www.iesve.com 

Integrated Environmental Solutions Limited. Registered in Scotland No. SC151456
Registered Office - Helix Building, West Of Scotland Science Park, Glasgow G20 
0SP
Email Disclaimer 


-----Original Message-----
From: David Connet [mailto:d...@agilityrecordbook.com] 
Sent: 23 January 2015 15:53
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] Preventing msi file from being directly executed by a 
user?

On 1/22/2015 10:33 PM, sky wrote:
> I'm now using burn cumstom bootstrapper application, and in my custom ba
> there is a step for validating product key. But since my msi file is
> external to the bootstrapper, anyone can install msi file directly without
> entering a product key. How can I prevent the msi file from being executed
> directly? (other than embedding the msi file into bootstrapper or adding
> custom action for product key validation to the msi)

Personally, I wouldn't worry. I'd just make sure the application refuses 
to run without a key. (If no key, it brings up a dialog to enter one 
before the app runs)

Dave


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to