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.
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.
Comment