Reading Registry/Hex Values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Tux
    Forum Member
    • Nov 2003
    • 8

    Reading Registry/Hex Values

    I'm currently having a small though annoying problem dealing with reading a dword value from the registry. The value I'm changing deals with "Windows File Protection". The dword value can take on 4 values

    1 - disabled, prompt at boot to re-enable
    2 - disabled at next boot only, no prompt to re-enable
    4 - enabled, with popups disabled
    ffffff9d - for completely disabled

    The problem I'm having is with the fourth value (ffffff9d). I read in another post that I can't use the hex value to change the reg value but must use decimal instead. So I have inserted the decimal value (4294967197). Everything is fine except when after changing the dword value to (4294967197), without the paranthesis of course, I then display the registry value in a Dialog.Message, though the value that is returned is -99.

    Here is an example of my code:

    -- Set the data "Saved Value" in the user's Registry.
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "SFCDisable", "4294967197", REG_DWORD);

    -- Read the previously written value.
    SFCRegValue = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "SFCDisable", true);

    -- Display the value read from the Registry in a dialog.
    Dialog.Message("Registry Data", "The value read from the Registry is "..SFCRegValue..".");

    -------------------------------------------

    I need the return value to be accurate for the completion of my project.

    Thanx a bunch for your time.

    --------------------------------------------
    SUGESTION--

    Alow for the insertion of hexidecimal values into the registry.
  • Brett
    Indigo Rose Staff Member
    • Jan 2000
    • 2001

    #2
    Tux,

    We will look into that problem in the source code and get back to you.

    Comment

    • Mark
      Indigo Rose Staff Member
      • Jun 2000
      • 1945

      #3
      Hey Tux,

      I have looked into this issue and have found that there is a bug in AutoPlay 5.0.0.3. This bug has been fixed and the fix will be available in version 5.0.0.4.

      The value is written to the registry properly, but is being returned improperly from the registry.

      In the mean time you might consider writing the value out to the registry as a REG_SZ and then converting it to a number using the String.ToNumber() action if necessary.
      MSI Factory The Next Generation Intelligent Setup Builder

      Comment

      • Tux
        Forum Member
        • Nov 2003
        • 8

        #4
        Thanks for the reply. I will be looking foward to the new release.

        Comment

        Working...
        X