Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Application deployment question

Application deployment question

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studiosysadminhelp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asad Hussain
    wrote on last edited by
    #1

    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.

    M M 2 Replies Last reply
    0
    • A Asad Hussain

      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.

      M Offline
      M Offline
      MoustafaS
      wrote on last edited by
      #2

      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\...

      M 1 Reply Last reply
      0
      • M MoustafaS

        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\...

        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        This will work only, if the main program was installed at the default location... Regards, mav

        1 Reply Last reply
        0
        • A Asad Hussain

          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.

          M Offline
          M Offline
          mav northwind
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • M mav northwind

            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

            A Offline
            A Offline
            Asad Hussain
            wrote on last edited by
            #5

            How do i set the [TARGETDIR] after I get the value from the registry?

            M 1 Reply Last reply
            0
            • A Asad Hussain

              How do i set the [TARGETDIR] after I get the value from the registry?

              M Offline
              M Offline
              mav northwind
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups