tags:

views:

38

answers:

4

Hi all,

I have an application (Installed as a service) that has 5 different versions. For testing I need to have all 5 installed. Currently I have to uninstall the application and reinstall the required version.

The application has a single exe (in Program Files\App) along some an xml file containing it's settings. This is installed via an MSI file. Each version has the same file\service name and checks for previous versions before installing.

Any ideas on a way to run all five versions at the same time?

+1  A: 

Though this is more of a Sever Fault type of question:

http://www.microsoft.com/windows/virtual-pc/

There's yer answer :-)

Caladain
+1  A: 

Use virtual machines for each of your 5 different versions.

VMWare player is free: http://www.vmware.com/products/player/

Starkey
A: 

Use VirtualBox.

Create one test system, configure it, then clone it 5 times (you'll have to use vboxmanage), and install one version on each of them.

If it wasn't a service, I had suggested Sandboxie, but I doubt that Sandboxie can handle services.

leoluk
+1  A: 

First of all, I assume you're a developer, not the QA person. The QA need to use either virtual machines, or just 5 separate PCs. What I'm describing is a dirty hack that might save you some time.

Install version #1 to C:\program files\YourApp_1

Launch services.msc, stop the service, change the startup type to manual.

Launch regedit.exe.

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services key, find the key for your service, rename the service: change both the key name, the "DisplayName" value, and to simplify your life write something meaningful to the "Description" value, e.g. "MyApp 1.0 - this is the reference version".

If the installer checks some other keys before installing (it might be e.g. in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YourApp), remove them. If you don't know those keys - use SysInternals ProcessMonitor to get them (set filter to instmsiw.exe or something, then launch the installer, wait for the "the prevoius version was found" message, alt-tab to the ProcessMonitor, stop logging, and read the log bottom-to-top)

Now install version #2 to C:\program files\YourApp_2, repeat the process.

At the end, to switch versions you'll only need to launch services.msc, stop the version that's currently running, start another one. Or use net start / net stop command line commands. Or whatever.

P.S. Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Soonts
Great solution - Thank's Soonts
madlan