Archive: Newbie question about sections


Newbie question about sections
I think I know the answer but want to make sure.

I just need to "repackage" an installer that doesn't include files needed for 95 and 98 pre SE.

The user doesn't need to choose anything, but it needs to detect OS and if the needed files are there. If need, intall needed files, 95 needs Dcom95 and vcred. 98 just needs vcred. Then reboot (or when machine is rebooted) install the main file.

Using more than one section here would just over complicate things, right?

IE any groups of code I make should be seperated using lables only.

I doubt this matters, but since this will be exectued in a lan environment (mostly logon scripts) I might have files downloaded as needed from a local server.

Thanks


yes it should work with only one section ;)

1 - you detect the OS in the function .onInit
You stock the name of the OS in a variable ($OS)

2 - you install the file you want in the section
it should look like this

StrCmp OS "win95" if endif
if:
; install win95 files
endif:

but you can optimize ;).

3 - you stock the main file(the one when machine is rebooted)
in the registry 'runonce'

4 - you ask the person to reboot with a message box


Yeah, I know it will work. From what I can tell, you can make any kind of installer with a single section - if you want to do it the hard way.

I'm just making sure I'm not missing something about sections that would give me a need for them. In fact, like I said, in this case it seems like more than one section would get in the way or make it more complicated.

But thanks for the quick reply, and you did confirm what I was thinking about If statements being handled differently than most scripting.