PDA

View Full Version : Create Registry Key


craigedmonds
01-30-2006, 03:37 PM
I have a Page called "LicenseDetails-Add".

On that page I have an Input Filed and a button.

I want the button to add a registry entry in the system Registry with the code thats is inputted into the input filed on the page. (the license code)

This is what I have so far on the button...

01. --get the serial number
02. sSerial = Input.GetText("serial");
03. -- now create the registry key
04. Registry.CreateKey(HKEY_LOCAL_MACHINE, "Software\\BlueZebra");
05. --then go back to the license check page
06. Page.Jump("LicenseCheck");

I think I need to add some more script to Line 4 so that it creates the license entry in the registry based on the input of the input field.

Help anyone?

Daniel TM
01-30-2006, 03:42 PM
Use this
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\BlueZebra", "Serial", ""..sSerial.."", REG_SZ);

craigedmonds
01-30-2006, 05:50 PM
That woked Great Thanks!