Sign in to follow this  
Followers 0
Oktoberkind

Registryentries

1 post in this topic

#1 ·  Posted (edited)

Hallo together.

Here to insert a program around Registryentries fast.

I ask to excuse my English, but I am not from England.

In the next days surely further programs follow, if it is desired.

Many greetings Tim

#include <GuiConstants.au3>

#Include <GuiCombo.au3>

GuiCreate("Registry Entry creator", 380, 230,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

GUISetBkColor(0x87ceeb)

; Gruppe

$font="Arial"

$Group_1 = GuiCtrlCreateGroup("Registry Entry creator", 10, 10, 360, 210)

GUICtrlSetFont (-1,9, 400, $font)

; First Key

$firstkey = GUICtrlCreateCombo("", 100, 35, 255, 25)

GUICtrlSetData(-1, "HKEY_CLASSES_ROOT\|HKEY_CURRENT_USER\|HKEY_LOCAL_MACHINE\|HKEY_USER\|HKEY_CURRENT_CONFIG\|HKEY_PERFORMANCE_DATA\|", "HKEY_CURRENT_USER\")

$font="Arial"

$Label_1 = GuiCtrlCreateLabel("Main key", 20, 40, 80, 25) ;100

GUICtrlSetFont (-1,9, 400, $font)

; Follow Key

$folowkey = GuiCtrlCreateInput("Software\AutoItcom\", 100, 60, 255, 20)

$font="Arial"

$Label_2 = GuiCtrlCreateLabel("Under key", 20, 65, 80, 25)

GUICtrlSetFont (-1,9, 400, $font)

;Datentyp

$dattyp = GUICtrlCreateCombo("", 100, 85, 255, 25)

GUICtrlSetData(-1, "REG_SZ|REG_BINARY|REG_DWORD|REG_MULTI_SZ|REG_EXPAND_SZ|", "REG_SZ")

$Label_3 = GuiCtrlCreateLabel("Datatyp", 20, 90, 80, 25)

GUICtrlSetFont (-1,9, 400, $font)

; Datenname

$datname = GuiCtrlCreateInput("test", 100, 110, 255, 20)

$font="Arial"

$Label_5 = GUICtrlCreateLabel("Name", 20, 115, 80, 25)

GUICtrlSetFont (-1,9, 400, $font)

; Datenwert

$datwert = GuiCtrlCreateInput("123456", 100, 135, 255, 20)

$font="Arial"

$Label_4 = GUICtrlCreateLabel("Data value", 20, 140, 80, 25)

GUICtrlSetFont (-1,9, 400, $font)

$font="Arial"

; Exit

$Button_1 = GuiCtrlCreateButton("Exit", 260, 165, 100, 40)

GUICtrlSetFont (-1,9, 400, $font)

; Eintragen in Registry

$Button_2 = GuiCtrlCreateButton("Register", 20, 170, 100, 40)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_2

Dim $cbo_text_firstkey

Dim $cbo_text_dattype

Dim $dlg_answer

_GUICtrlComboGetLBText ( $firstkey, _GUICtrlComboGetCurSel ( $firstkey ), $cbo_text_firstkey )

_GUICtrlComboGetLBText ( $dattyp, _GUICtrlComboGetCurSel ( $dattyp ), $cbo_text_dattype)

$dlg_answer = MsgBox(266529,"Is the key to be registered into the Registry?",$cbo_text_firstkey & GuiCtrlRead($folowkey) &@LF& "Data value: "&GuiCtrlRead($datwert)&@LF& "Datatyp: "&$cbo_text_dattype)

if $dlg_answer = 1 then ;ok

$success = RegWrite($cbo_text_firstkey & GuiCtrlRead($folowkey), GuiCtrlRead($datname) , $cbo_text_dattype , GuiCtrlRead($datwert))

if $success <> 1 Then

msgbox(0,"A error arose","Reread please the following error code in the assistance:" &@error)

Endif

Endif

Case $msg = $Button_1

Exit

Case Else

EndSelect

WEnd

Exit

Edited by Oktoberkind

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