cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
NSridhar1980
Level 2

Selecting all instances of an application & the respective paths

Hi,

Please help me out in meeting the following requirement in the installshield.

1. Find all instances of an application (in my case its Microsoft Dynamics GP 9.0)
2. Display all the paths with its Instance Name
3. Allowing the user to choose any one path
4. Copy a file (our product file)in the selected path

At present I am hard coding the default path and copying our product file in that location.

Thanks,
Sri
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

What kind of project are you using? I'm not familiar with how that application's multiple instances work, but some InstallScript that searches for every occurrence of a telltale registry key, file/directory, etc., seems like it should work...
0 Kudos
NSridhar1980
Level 2

I am working on BasicMsi project

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Business Application\Great Plains

This is the main registry path of Microsoft Dynamics GP. GP will create a folder SETUP under this registry path for every instances in the same machine.

AppPath property of the SETUP folder will give instance physical path &
InstanceName property of the SETUP folder will give instance phyiscal name.

For Eg:-
For the first installation the registry path will be

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Business Application\Great Plains
\DEFAULT\SETUP

For the second instance the registry path will be

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Business Application\Great Plains
\Inst01\SETUP

For the third instance the registry path will be

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Business Application\Great Plains
\Inst02\SETUP

Now my requirement is to find all the instances of GP in the machine and display the path with instance name in a list or tree view and allow user to select the requierd path. Then I have to use this selected path and deploy our product file in that physical location.

Please Guide me.
Thanks,
0 Kudos
RobertDickau
Flexera Alumni

A custom action that calls RegDBQueryKey should get the values.

(Displaying them in a dialog box will be another challenge, but working out the query should be a good start. For the dialog box, something like the help topic "Windows Installer API Functions Example" gives the general idea.)
0 Kudos