Application deployment question
-
I have a standard application with an installer that deploys to a user-specified directory. I have also written plugins to the application that can be deployed individually as required. The only problem is that the plugins need to be dropped in the same directory as the original application installation directory. How do I write an MSI in visual studio .net that installs the plugin in the same directory WITHOUT the user having to choose the application installation directory? Essentially, the msi's only function will be to drop a single dll into the application install directory.
-
I have a standard application with an installer that deploys to a user-specified directory. I have also written plugins to the application that can be deployed individually as required. The only problem is that the plugins need to be dropped in the same directory as the original application installation directory. How do I write an MSI in visual studio .net that installs the plugin in the same directory WITHOUT the user having to choose the application installation directory? Essentially, the msi's only function will be to drop a single dll into the application install directory.
As a first step you can check for it's path at the regisrty in :
HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENT VERSION\UNISTALL\ [Your Application Name].
Or If you want it also to be in a specified location : In the setup project ckeck the steps that the setup will perform and then ,delete the step that the user chooses in it the folder ,so it will be installed to the default directry : WinDir\Program Files\Your Company Name\Your Application Name\... -
As a first step you can check for it's path at the regisrty in :
HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENT VERSION\UNISTALL\ [Your Application Name].
Or If you want it also to be in a specified location : In the setup project ckeck the steps that the setup will perform and then ,delete the step that the user chooses in it the folder ,so it will be installed to the default directry : WinDir\Program Files\Your Company Name\Your Application Name\...This will work only, if the main program was installed at the default location... Regards, mav
-
I have a standard application with an installer that deploys to a user-specified directory. I have also written plugins to the application that can be deployed individually as required. The only problem is that the plugins need to be dropped in the same directory as the original application installation directory. How do I write an MSI in visual studio .net that installs the plugin in the same directory WITHOUT the user having to choose the application installation directory? Essentially, the msi's only function will be to drop a single dll into the application install directory.
That's quite simple. Your plugin installer will have to know the path your main app has been installed into. You can set a registry entry during installation of your main app to hold this information by setting its value to "[TARGETDIR]". In your plugin installation project, you can add a registry search to your start conditions that's searching for this registry entry. If the search found a value, assign this value to a variable, e.g. MAININSTALLDIR. Now set the default value for the installation directory to [MAININSTALLDIR] and remove the dialog where the user can choose the installation location and you're done. Regards, mav
-
That's quite simple. Your plugin installer will have to know the path your main app has been installed into. You can set a registry entry during installation of your main app to hold this information by setting its value to "[TARGETDIR]". In your plugin installation project, you can add a registry search to your start conditions that's searching for this registry entry. If the search found a value, assign this value to a variable, e.g. MAININSTALLDIR. Now set the default value for the installation directory to [MAININSTALLDIR] and remove the dialog where the user can choose the installation location and you're done. Regards, mav
How do i set the [TARGETDIR] after I get the value from the registry?
-
How do i set the [TARGETDIR] after I get the value from the registry?
Go to the file system editor, select the application directory and enter [MAININSTALLDIR] (resp. the name for your variable) for DefaultLocation (the standard value is [ProgramFilesFolder][Manufacturer]\[ProductName], but you want the directory you found in the registry). Regards, mav