I used the code from this Answer from the Member TLama. I think it's exactly what i need, but I have two problems with it:
I need the Serial from the edit boxes in the registry. This is what i tried:
Root: "HKCU"; Subkey: "Software\myProg"; ValueType: string; ValueName: "Serial"; ValueData: "{code:GetSerialNumber}"; Flags: deletevalue uninsdeletevalue
but Inno gives me an error. TLama wrote in his answer (from the Link above), it's enought to call the GetSerialNumber
part, but I do sth. wrong...
The other question: Is it possible to prefill the serialbox with an example code? E.g. 12345 or abcde? I'm using only one input box with 10 chars...
Hope someone can help, and sorry for my bad english ;)
You can use
UserInfoPage
and then{userinfoserial}
but if you want to use TLama's solution then you should slightly changeNextButtonClick
function:Var
SerialEdits: array of TEdit;
has to be set as Global for the script. You also may want to add key to registry later (e.g. withCurStepChanged
whenssDone
or something) or write your own function that will passSerial
toResult
asString
and then call it inRegistry Section
.