1

Is there an installer step that is only run at the time of first install, and not during update or re-install?

The first time our installation is run, the installer package provides an "install license". (needed by a sub-installation that I cannot control.) This license is not intended for the user and is only needed for the initial installation itself. The license file needs to be removed at the end of the installation, but only the first time the installation is run.

I can't remove the file when performing a repair or update install because this will remove a users valid application license which is provided by the user at first application runtime.

I should mention this license file is an application license, and not an installer license agreement. The sub installation that is called by this installer requires the license to be provided at install time.

Prompting for the license at install time will not work because the person performing the install doesn't have the users license file. The installation license needs to be removed from the target directory so the application will prompt the user for their license at first runtime.

Here's what I'm using to distribute the license file to the target computer.

[Files]
; The license files 
Source: "..\Licenses\*"; DestDir: "{tmp}\Coreo Design"; Flags: onlyifdoesntexist 
jrchilds
  • 63
  • 7
  • Particularly see [my answer](https://stackoverflow.com/q/3205220/850848#28499259). – Martin Prikryl Dec 27 '17 at 08:56
  • The original answer to that question was helpful, thanks for pointing me in that direction. Your solution wont work in my case for two reasons. 1. The GUID changes every install 2. I need the check to return the status from the beginning of the install, not in real time. You could work on your attitude. I've seen a lot of your replys to other people since this is where I go for help with inno, and I've noticed that many of your responses are really arrogant and you frequently act like you're being inconvenienced by helping. But, you're the admin, not me, maybe that works for you. – jrchilds Dec 27 '17 at 19:28
  • 1) Where does your question says that GUID changes in your installer? 2) I do not understand your second point. – Martin Prikryl Dec 27 '17 at 20:36
  • Can you point me to an example of my bad attitude? – Martin Prikryl Dec 27 '17 at 20:39
  • My question didn't mention the GUID changing because I didn't learn that until I implemented your solution. When it didn't work I looked into it and realized the reason it didn't work was because of the changing GUID. Using your function IsUpgrade didn't work for me at the deInitializeSetup step because the install has finished and any criteria I might evaluate to determine a previous install would return true at this point. I needed to have the isUpgrade flag set at the beginning of the install like in Andreas Rejbrand's solution. – jrchilds Dec 28 '17 at 21:11
  • To start, you never even tried to answer my original question "Is there an installer step that is only run at the time of first install, and not during update or re-install?". Then without trying to understand my question or the problem I was trying to solve, you pointed me to a loosely similar answer, marked my question as a duplicate, and closed it, even though I'm trying to solve a different problem than the user from the other question. Fortunately I was able to glean enough from the original answer to implement my own solution, but you did very little to help me. – jrchilds Dec 28 '17 at 21:26
  • If your GUID changes, every install is the *first install*. Changing GUID is not a standard Inno Setup behavior. It is something specific to your installer. So you have failed to ask a good question in the first place. – Martin Prikryl Dec 29 '17 at 11:37
  • Also you claim that I did "very little". But you failed to notice, that noone else even bothered to respond to your unclear question. – Martin Prikryl Dec 29 '17 at 11:40
  • I understand that the changing GUID is non standard. But it's out of my control, as it's everything else in the sub installer. I asked a very specific question knowing that my configuration was going to be a long and potentially confusing explanation. What's the point of asking a good question if you're not going to answer it anyway. – jrchilds Dec 30 '17 at 15:59
  • I didn't fail to notice anything. And I did appreciate your help, which is why I said thank you. It was however, someone else's answer that ended up leading me to a solution. Next time I have a question, I'll be sure to spell out all the excruciating relevant details so you can write a solution tailored to my problem. A compromise might be, you could just answer the question that's asked and if I need more help I'll ask a different question. – jrchilds Dec 30 '17 at 16:08
  • That's what I did by closing the question as duplicate, as I believed it really answers your question. Had you clarified your question (with knowledge gained from the other question), I would happily reopen it and answer it. – Martin Prikryl Dec 30 '17 at 16:10

0 Answers0