Announcement

Collapse
No announcement yet.

Problem reading PATH value in Windows Registry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem reading PATH value in Windows Registry

    Hello,
    I am trying to read from registry the value of the OS Path an the process return me a Error.
    Could anybody help me please with a example.
    Thank you

  • #2
    Re: Problem reading PATH value in Windows Registry

    Please post the code you were attempting to use as well as details of the error. Thanks.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Problem reading PATH value in Windows Registry

      I tried to read the key:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Environment
      and the value: Path
      My problem is the blank space in the path of the key.
      I tried to put this into quotation marks, but it didn't work.
      This is the result of my log file:
      [Performing Actions]
      START: Perform action: Read from Registry
      Variable name = %RegistryVar%
      Default value = Defecto
      Main key = HKEY_LOCAL_MACHINE
      Sub key = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
      Value name = PATH
      TRUE if exists = FALSE
      Auto-expand if REG_EXPAND_SZ = TRUE
      (On Error) User notification mode = Custom
      Custom Message = %RegistryVar%
      (On Error) Action = Abort Update
      Result = 1
      END: Perform action: Read from Registry

      Comment


      • #4
        Re: Problem reading PATH value in Windows Registry

        You will definitely receive an error if you have the quotes included, so remove those from your "Sub Key" field.

        I didn't have any problems on my end so make sure that you are reading from HKEY_LOCAL_MACHINE, rather than HKEY_CURRENT_USER. Also make sure there are no trailing spaces in your fields and everything is spelled correctly.

        Also make sure that the key hasn't been deleted or corrupted in your Registry. Physically check it to make sure.

        If you are still having problems:

        What OS are you testing on?
        Are you using the latest build 6.0.1.2?

        Comment


        • #5
          Re: Problem reading PATH value in Windows Registry

          It's working now.
          Thank you very much.

          Comment


          • #6
            Re: Problem reading PATH value in Windows Registry

            Happy to help.

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎