PDA

View Full Version : Use SF to launch either setup or executable from CD


tfair
04-04-2007, 11:11 AM
I'm sure this must be very basic and with many solutions, but I am struggling with SF 5 and need to know if SF version 7 can do it more easily:

I am installing only some files from a CD onto the user's computer, and want my program to run from the CD.

In order to do this, I have tried using SF to do a preinstallation check that looks into the registry to see if the key exists and if not, proceeds with the install and if found, simply launches the main executable. I could have used an ini file or some other approach I suppose but this seemed the most direct.

In SF 5, I created a presetup.exe file, doing the following:
1. Removed all screens from the screen manager, and did not add any files to the setup.
2. Created a variable called PrevLoaded. The default is FALSE and is set to TRUE if the registry subkey exists. The main key is HKEY_CURRENT_USER.
3. Added 2 shell operations conditional on the value of PrevLoaded. Not equal to TRUE executes the setup.exe to install the files. If equal to TRUE, the main executable is simply launched from the CD.

What happens is that the setup.exe is properly launched the first time around and files are installed. I check the registry subkey using regedit and it is indeed there at the correct location. However, on any following insertions of the CD, the presetup simply launches the setup.exe again, as if the PrevLoaded variable has not been set to TRUE. I've looked at the Shell Operations window's Advanced tab and played with "When do you want he operation to perform?" but am no wiser after fiddling with the sequence.

Any advice greatly appreciated.

Eagle
04-04-2007, 05:10 PM
Hi there, fwiw Setup Factory 7 has the power of the LUA scripting engine
with more powerfull builtin actions that can be called via scripting and more...

using a little bit of scripting say in 'on Startup' actions in SUF70 to check for
the reg entry and or other 'installed' files would not take much to implement.

to be Honest SUF70 is a quantum leap from earlier versions, you can just
plain do heaps more with it. I for one reccommend in the investment.

if not already, download the most recent trial version and see how you go
implementing your functionality. The other thing is SUF70 and later versions
to be Created by IR include Vista support, which will eventually catch up
with everyone as a needed thing. ;)

if you do and get stuck with things there's heaps of existing posts that
may assist, or you will get the help you need :yes :)

HTH in some way