Announcement

Collapse
No announcement yet.

Registry problem with paths containing spaces

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registry problem with paths containing spaces

    hi, i'm trying to read/set values with spaces in them, and they just dont work.

    eg. HKLM\Software\Microsoft\Windows\CurrentVersion\Set up\Installation Sources

    this key really does exist, as proven by regedit. If i change the value name to something without a space in it (eg. SourcePath), SF reads it fine.

    the same problem exists for path names with spaces - eg. HKLM\Software\Microsoft\Windows NT\CurrentVersion\Setup\Installation Sources
    (space in the "Windows NT")

    is there a fix or a workaround for this?

  • #2
    Re: Registry problem with paths containing spaces

    Have you tried surrounding the path with quotation marks?
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: Registry problem with paths containing spaces

      well yes - doesnt work. You have to try it to believe it.

      Comment


      • #4
        Re: Registry problem with paths containing spaces

        i've even tried using a variable (eg. %IS%) and assigning it to the value "Installation Sources" (both with AND without the quotes), and then putting this variable as the "Value name" when trying to read from the registry. No luck either.

        Comment


        • #5
          Re: Registry problem with paths containing spaces

          Hi,

          I tried reading in:

          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\Arial (TrueType)

          and I was able to read this value in. Perhaps you have a spelling error in your Read From Registry action, or maybe you are using the wrong Main Key?

          mark.
          MSI Factory The Next Generation Intelligent Setup Builder

          Comment


          • #6
            Re: Registry problem with paths containing spaces

            well guess what - i can too for the font! but i cannot for the first example given. And it is not a spelling error. Why dont you try my example? see if it works on your machine. I'm using SF6 evaluation.

            Comment


            • #7
              Re: Registry problem with paths containing spaces

              ok, i think i have isolated the problem (but *NOT* the solution)


              It's not a problem with spaces, but rather with the Value Type. "Installation Sources" is REG_MULTI_SZ, and SF cant handle this.

              [This message has been edited by evaluator (edited 03-19-2002).]

              Comment


              • #8
                Re: Registry problem with paths containing spaces

                Could you use

                HKLM\Software\Microsoft\Windows\CurrentVersion\Set up\SourcePath

                instead?

                As a workaround, you could export the value to a .reg file by calling regedit with the /e option, and then use text file actions in SF6 to retrieve the value. You'll need to convert the value from hex to decimal, but it wouldn't be very hard to do that using actions. (Tip: use a string like "0123456789abcdef" with FindString for the conversion matrix.)
                --[[ Indigo Rose Software Developer ]]

                Comment

                Working...
                X