[SOLVED] Stupid question #2: DWORD registry value in hexadecimal
OK, here's another question which reveals just how new to the KBOX I am:
In a Kscript, in my Task section, I'm using the step "Set a registry value". The registry value I want to set is a DWORD, and I know its hexadecimal value.
How do I type this hexadecimal value into the Data text field so that it will be interpreted as hexadecimal and not decimal? (For example, do I need the leading "0x" prefix?) Does this text box assume that DWORDs are in decimal?
When I edit the same registry value in RegEdit, I have a radio button that lets me toggle between hex/decimal, but nothing here that indicates the correct syntax. Sande
In a Kscript, in my Task section, I'm using the step "Set a registry value". The registry value I want to set is a DWORD, and I know its hexadecimal value.
How do I type this hexadecimal value into the Data text field so that it will be interpreted as hexadecimal and not decimal? (For example, do I need the leading "0x" prefix?) Does this text box assume that DWORDs are in decimal?
When I edit the same registry value in RegEdit, I have a radio button that lets me toggle between hex/decimal, but nothing here that indicates the correct syntax. Sande
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
airwolf
14 years ago
Try it out one way, and if it doesn't work then try the other. I haven't written DWORD values with scripting yet, so I can't say one way or the other. However, it is likely that the KBOX will determine based on a REGEX of whatever you enter. If you put 0x.... it may automatically write in hex, and without a 0x it may just write as decimal. I know in reg files you need to prefix a hex value with "hex:" (i.e. hex:0xffffffff), but I'm not sure how the KBOX interprets the values in the field.
Posted by:
GillySpy
14 years ago
Posted by:
airwolf
14 years ago
Posted by:
GillySpy
14 years ago
The value in the registry is equivalent whether it's decimal or hex is up to you. using 123 as an example. When looking at registry editor at an item represented in decimal it looks like this:
123
when hex it looks like this
0x0000007b
To tell the kbox to put in decimal 123 you enter: 123
To tell the kbox to put in hex equivalent you enter: dword:0000007b
123
when hex it looks like this
0x0000007b
To tell the kbox to put in decimal 123 you enter: 123
To tell the kbox to put in hex equivalent you enter: dword:0000007b
Posted by:
airwolf
14 years ago
To tell the kbox to put in decimal 123 you enter: 123
To tell the kbox to put in hex equivalent you enter: dword:0000007b
Excellent, this is the clarification I was looking for. I wasn't sure if the DellKACE dev-wizards put in some REGEX function to automatically determine whether it's hex or dec by the use of the 0x prefix. [;)] I guess not.
Posted by:
GillySpy
14 years ago
Okay i should not hit "OK" so soon...
The value in the registry is equivalent whether it's decimal or hex is up to you. using 123 as an example. When looking at registry editor at an item represented in decimal it looks like this:
123
when hex it looks like this
0x0000007b
To tell the windows registry editor to put in decimal 123 you enter: 123 and "decimal"
To tell the windows registry editor to put in hex equivalent you enter: 7b and choose "hexadecimal"
To tell the kbox to put in hex equivalent you enter: dword:0000007b
AFAIK: you can't specificy hex or decimal so you enter it as (dword:0000007b)
If you don't know the hex the built-in windows "programmer" calculator can translate it for you or you can view it in the registry
The value in the registry is equivalent whether it's decimal or hex is up to you. using 123 as an example. When looking at registry editor at an item represented in decimal it looks like this:
123
when hex it looks like this
0x0000007b
To tell the windows registry editor to put in decimal 123 you enter: 123 and "decimal"
To tell the windows registry editor to put in hex equivalent you enter: 7b and choose "hexadecimal"
To tell the kbox to put in hex equivalent you enter: dword:0000007b
AFAIK: you can't specificy hex or decimal so you enter it as (dword:0000007b)
If you don't know the hex the built-in windows "programmer" calculator can translate it for you or you can view it in the registry
Posted by:
snissen
14 years ago
Now that we're testing these dword: values, we found they are not working.
What is working for registry DWORDs is to specify the value as 0x12345678 (no dword: in front). This 0x hexadecimal notation is also what the Configuration Policy wizard generates in a "Windows Automatic Updates Settings" script. Sande
What is working for registry DWORDs is to specify the value as 0x12345678 (no dword: in front). This 0x hexadecimal notation is also what the Configuration Policy wizard generates in a "Windows Automatic Updates Settings" script. Sande
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.