|
![]() |
#1 |
Junior Member
Join Date: Nov 2006
Posts: 19
|
Problem using WriteRegDWORD
I am trying to write an integer stored in a variable into a REG_DWORD and I am having some problems. The line I am using to store this integer is:
WriteRegDWORD HKLM "Software\Classes\ClassName" "class_key" $ClassKey $ClassKey holds an 8 character decimal number entered by the user. If $ClassKey is “11111111†then it is stored into the registry OK. If $ClassKey is “01111111†(which is 0x1f447) then what is actually stored in the registry is 299593 (which is 0x49249) If $ClassKey is “1111111â€, (no leading 0) then it will be stored correctly. I have to allow for the user to enter leading zeros. Can someone tell me what I am doing wrong and how I can get around it? Thanks. |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
|
It is all right.
01111111 (octal) = 0x49249 (hexadecimal). Quote:
![]() EDIT: 0x1f447 (hex) = 0372107 (octal) - to my mind. |
|
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Nov 2006
Posts: 19
|
Thanks glory_man. I should have realized that.
Is there a command or macro to remove leading zeros from a string, or do I just need to create my own string modifying function? |
![]() |
![]() |
![]() |
#4 |
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
You may use registry plugin to solve that. EX
code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|