/build/static/layout/Breadcrumb_cap_w.png

On Uninstall restore overwriten file?

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   [ + ] Show comments

Answers (3)

Posted by: turbokitty 14 years ago
6th Degree Black Belt
0
How are you going to restore the old one if the install MSI writes over it?
Posted by: sv408 14 years ago
Senior Yellow Belt
0
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.
Posted by: India_Repackaging 14 years ago
Blue Belt
0
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ