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. How Do I: Set the installed Path in the Registry from a setup project?

How Do I: Set the installed Path in the Registry from a setup project?

Scheduled Pinned Locked Moved C#
questioncomwindows-admintutorialworkspace
2 Posts 2 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.
  • T Offline
    T Offline
    Tony Archer
    wrote on last edited by
    #1

    I have written a PowerPoint Add-In and am working on the install package. I created the setup project and am trying to set a registry entry to the location that the application is installed (whatever that may be). I must do this to have access to the install directory as with COM add-ins all the application path properties in the Framework return *OFFICE's* application path, not my add-in's. So in the registry part of the setup I have set several static values but also want to set one that is dynamic based on the install location. Anyone know how to do this? --Tony Archer "I can build it good, fast and cheap. Pick any two."

    H 1 Reply Last reply
    0
    • T Tony Archer

      I have written a PowerPoint Add-In and am working on the install package. I created the setup project and am trying to set a registry entry to the location that the application is installed (whatever that may be). I must do this to have access to the install directory as with COM add-ins all the application path properties in the Framework return *OFFICE's* application path, not my add-in's. So in the registry part of the setup I have set several static values but also want to set one that is dynamic based on the install location. Anyone know how to do this? --Tony Archer "I can build it good, fast and cheap. Pick any two."

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      First of all, if these add-ins are .NET assemblies, you can always get their path using Assembly.GetExecutingAssembly().Location, among a few similar ways. To set the path in the install, though, set the registry value to [INSTALLDIR] (more than likely, if all your assemblies go into the same installation directory). There are much better ways but the VS.NET Windows Installer project doesn't make them possible without using a tool like Orca (from the Windows Installer SDK) and modifying the MSI package after it's compiled, which also requires some knowledge about MSI packages.

      Microsoft MVP, Visual C# My Articles

      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