User installation folder for registry settings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nasomi
    Forum Member
    • Jul 2014
    • 3

    User installation folder for registry settings

    I'm trying to use the variables to generate the registry files based on installed directory. I need to set the installfolder in the registry based on where the user chooses to install the program, not just the default location. If they chose to install MyProgram in d:\someprogram\ I need the registry installfolder to read d:\someprogram\MyProgram\
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5130

    #2
    Simply use the %AppFolder% session variable when setting the value of the registry key...

    Ulrich

    Comment

    • nasomi
      Forum Member
      • Jul 2014
      • 3

      #3
      Thank you, I will try that.

      Comment

      • nasomi
        Forum Member
        • Jul 2014
        • 3

        #4
        This is unexpected, I get Line=2: unexpected symbol near '%'.

        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\POL\\InstallFolder","0001", %AppFolder% "\\FF\\",REG_SZ);

        I had tried that yesterday and it did not work. I was reading this:

        Comment

        • Ulrich
          Indigo Rose Staff Member
          • Apr 2005
          • 5130

          #5
          Please read the FAQ.

          Ulrich

          Comment

          Working...
          X