I have a Software that has a license.dat.
by exchanging this license.dat with an other version i get an advanced functionality of the software.

I'm trying to make a msi that overwrites the existing license.dat on installation. (That's the easy part)
when the uninstall of the msi runs it should restore the old license.dat.
can i get this done with msi internal functions? If yes, how?
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


How are you going to restore the old one if the install MSI writes over it?
Answered 08/20/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
Well AcIvi,

You'll need to save the old license.dat somewhere else or with a different name during the install. I recommend doing that with a custom action that has a condition set to execute during install. It will need to be sequenced before the component containing the new license.dat file is installed.

You'll also need to restore the old license.dat back to its original location (or name) during the uninstall. I recommend doing that with a custom action that has a condition set to execute only during uninstall.
Answered 08/20/2009 by: sv408
Senior Yellow Belt

Please log in to comment
Hi AcIvI,

You can add a custom action in the form of a VBScript which copies the file from a path to the License.dat location. I would have created a folder in the Sourcedir and copied the file from that folder during uninstall.
Hence your CA must be
  • Call VBScript from Embedded Code / Installation
  • REMOVE~="ALL" (during uninstallation)
  • Schedule it just before InstallFinalize
  • Deferred System Context
  • Synchronous Ignore on Exit Code
  • Copies from SourceDir\Old License\License.dat to required location
  • You will have to make use of CustomAction Data

I think this should work
Answered 08/20/2009 by: India_Repackaging
Blue Belt

Please log in to comment