views:

252

answers:

2

I need to create a single installer that I can distribute to machines running one of Windows XP or Vista. The installer needs to do the following:

1) Check if the OS is XP SP3 or Vista. If it's vanilla XP or SP1, run an MSI. This will install Remote Desktop 6.1.

2) Run an executable. This is the installation file for a VPN client application.

3) Run a RemoteApp deployment MSI.

4) If the OS is XP, edit the registry as per http://support.microsoft.com/kb/951608 in order to enable Network Level Authentication for Remote Desktop. This requires appending to existing registry keys (i.e. not overwriting their existing values).

Initially, I'd hoped to do this with a simple batch file, but I read that it's impossible to append values to a registry key -- I can only create new ones or overwrite old ones. I've looked into a couple of GUI installers, but I haven't found one that will simply run another installation executable. I've also looked at NSIS, but learning an entirely new scripting language seems a bit like overkill.

Any simple solutions out there?

A: 

Isn't an append to a registry key a matter of reading the current value, concatenating your new data and overwriting the key with the combined result? I would think that would be doable in a batch script.

dkackman
A: 

I'm going to recommend NSIS only because it's what I use for my application installers, it has never let me down when I need to add new functionality, and I've enjoyed every minute of learning the language (which really isn't that bad).

I've looked into a couple of GUI installers, but I haven't found one that will simply run another installation executable.

NSIS can easily run executables and MSI installers. It can also give you their return codes so your installer's logic can react to errors, etc.

learning an entirely new scripting language seems a bit like overkill

I'd say it really depends on how long you will need to maintain this installer. If it's just setting up a test project on in-house machines, then yes it might be overkill to learn a new language. But if this installation is a process that your clients/business partners/etc will see, I think it's well worth the effort to learn a GUI install package, whatever it may be.

Some more things to think about: NSIS has plugins that make life easier when it comes to dealing with UAC, registry redirection, and detecting OS versions

Kyle Gagnet