How to automatically detect if setup has been run before?

boc
07-16-2003, 05:09 AM
Hi,

I am making an application that will be run from cd-rom. It will not be installed on the user's hard-drive. But still the components and references used for my application have to be installed on the hard-drive. I wrote a setup-script for INNO that does this correctly.

Now, I want the CD to autorun. If the setup has not been run before, it has to autorun setup, otherwise it has to run the application.
How do i detect if setup has been executed already? Do i have to make a vb-application that checks the registry and depending on the outcome, run either setup or the application itself? Or is there a much simpler way for doing this?

Boc

GavinO
07-17-2003, 03:56 PM
The registry is the normal way to do it. You could have a file put somewhere to indicate that the setup has been run, but this is dirtier and less reliable than the registry. The worst way would be the Intuit (TurboTax) way, where you put the flag in the MBR.

boc
07-21-2003, 01:56 AM
But how do i check the registry (before setup) without using a vb-application that uses precisely those components that the setup-file has to install?

Thinker
07-21-2003, 07:07 AM
Have you looked into whether Inno can check for a previous install. I
know Inno can launch the app after an install so if it can check and just
skip the install step, it can do the launching.

boc
07-21-2003, 09:22 AM
Looks like this is possible with Inno 4 beta, but you have to write some Pascal code for this. I don't know how to read/write from/to the registry in pascal. So that is not really an option for me.
Thanks anyway

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum