Sign in to follow this  
Followers 0
ludocus

RegWrite help

1 post in this topic

#1 ·  Posted (edited)

All my programs can save settings by creating a file and writing to it,.

I was wondering how to do this by regwrite?

something like:

CODE

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\inf", "user", "REG_SZ", "ludocus")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\inf", "pass", "REG_SZ", "pass")

$user = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\inf", "user")

$pass = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\inf", "pass")

$checkU = i ( "Hello", "Your username please?" )

if $checkU = $user then

$checkP = i ( "hello", "your password please?", "*" )

if $checkP = $pass then

msgbox ( 0, "Nice", "all correct" )

exit

else

msgbox ( 0, "WRONG", "All wrong" )

exit

EndIf

EndIF

func i($sTitle, $sPrompt, $sPas = "", $sDef = "", $sCo1 = 100, $sCo2 = 100, $sPos1 = -1, $sPos2 = -1)

$sIn = Inputbox ( $sTitle, $sPrompt, $sDef, $sPas, $sCo1, $sCo2, $sPos1, $sPos2 )

return $sIn

EndFunc

I don't know if this is correct?

- edit : never mind I checked it and it works.. well I will just leave this as an example..

Edited by ludocus

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0