|
#1
|
||||
|
||||
|
Probably a dumb question
I have a piece of software that requires a license file to run (extension .lf). The file must be unchanged at all times, even when the version changes. So, if Version 1.0 contains a license file and Version 1.1 contains the same license file, how do I prevent the Version 1.1 license file from overwriting the Version 1.0.
In other words, I don't want the license file in Version 1.1 to overwrite the license file in Version 1.0. So, do I just not add the license file when I create the difference file for Version 1.1? |
|
#2
|
||||
|
||||
|
Is the license file in version 1.0 and 1.1 exactly the same as what the user will have installed? Or does each user get a different license file? (After they install the product, do you send them a custom .lf file? Does your program write their name into the .lf file? etc.)
Key point: If the installed license file is exactly the same, it doesn't matter; Visual Patch won't make any changes to a file unless a difference exists between the two versions. (If the 1.0 license file is the same as the 1.1 license file, there's nothing to do.) If the version 1.0 license file was a trial license, and your question is "how do I make a patch that won't overwrite the registered user's license with the trial license file?"...again it doesn't matter. ![]() Visual Patch will only ever patch a file if it's an exact match for a file that was in one of the older versions it knows about. Key point: If the user has a modified license file, its MD5 signature won't match any of the license files your patch knows about, and it won't patch it. There is one exception, of course: and that's it you turn on the "Force install" option for the version 1.1 license file. (The "Force install" option is off by default. Turning it on tells Visual Patch to always install the new version, regardless of what's already there.) Note: what follows is an entirely hypothetical situation -- as I explained above, normally you don't need to do anything extra at all. Okay, so what if you have "Force install" turned on? Or, what if your question is more like this: "my version 1.0 users need to keep the version 1.0 license file; the version 1.1 license file is the same for all 1.1 users, but it's different from version 1.0, and I don't want the patched users to have it...after they patch, I want them to still have the old 1.0 license file. How do I do this?" I can think of three ways that could be done. One way is to remove the license file from the new version, and make sure you have the "Delete legacy files" option turned off (Project > Settings, Advanced tab). Then the patch won't even know about the license file, and because "Delete legacy files" is turned off, the old files will just be left lying around. Another way is to use some custom scripting: add the license file as a primer file (Project > Resources, Primer Files tab), and then modify your "On Post Patch" script to copy the license file over from %TempLaunchFolder% only if it doesn't already exist. (And then to delete the file from %TempLaunchFolder%, e.g. from "On Shutdown.") The third way is to include the license file in the new version (just like you normally would), but give it a script condition based upon whether the file exists yet, or what its MD5 signature is. For example, you could put something like this in the Script Condition field, to make it not patch the file if it already exists: Code:
File.DoesExist(SessionVar.Expand("%AppFolder%\\license.lf")) == false
Code:
Crypto.MD5DigestFromFile(SessionVar.Expand("%AppFolder%\\license.lf")) ~= "810b7f0b01022b738ed84d427e5c08e4"
__________________
--[[ Indigo Rose Software Developer ]] |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Math.RandomSeed() question | stickck | AutoPlay Media Studio 6.0 | 8 | 06-09-2006 10:42 AM |
| Kiosk Mode Window Manipulation Question | travisperkins | AutoPlay Media Studio 6.0 | 13 | 03-06-2006 08:40 AM |
| Dumb Newb Question - File Attachments | jimriley | AutoPlay Media Studio 5.0 | 7 | 06-04-2005 04:30 PM |
| Need Assistance with Random Question Quiz | marc3515 | AutoPlay Media Studio 4.0 | 5 | 02-16-2003 07:25 AM |
| dumb question? Can this program create *.msi installations? | lottidah | Setup Factory 6.0 | 2 | 12-12-2002 06:57 AM |
All times are GMT -6. The time now is 05:15 AM.







Linear Mode

