daft117 Posted December 31, 2011 Share Posted December 31, 2011 Ek olarak bu listede görmek istemediğiniz girişleri silebiliyorsunuz Kayıt defteri, array işlemlerine güzel bir örnek [img]http://img839.imageshack.us/img839/1271/123ne.jpg[/img] dosya linki: http://www.multiupload.com/BTKCN7W6IB kod: [code]#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> Global $i = 0, $name = "", $command = "", $aName[1], $aCommand[1], $aKey[1] $Form1 = GUICreate("verpacino Uninstaller", 625, 445, -1, -1) $List1 = GUICtrlCreateList("", 8, 8, 609, 370) $Button1 = GUICtrlCreateButton("Kaldır", 24, 392, 75, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Girişi Sil", 120, 392, 75, 25, $WS_GROUP) $Button3 = GUICtrlCreateButton("Yenile", 216, 392, 75, 25, $WS_GROUP) Yenile() GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 Kaldir() Case $Button2 GirisiSil() Case $Button3 Yenile() EndSwitch WEnd Func Yenile() $aKey = 0 $aName = 0 $aCommand = 0 Global $i = 0, $name = "", $command = "", $aName[1], $aCommand[1], $aKey[1] $aName[0] = 0 $aCommand[0] = 0 $aKey[0] = 0 While 1 ; İSİM VE KOMUTLARI AL ;~ ANAHTARLARI AL $i = $i + 1 $a = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i) If $a = "" And @error <> -1 Then ContinueLoop If @error = -1 Then ExitLoop ;~ İSİMLERİ OKU VE STRING'E EKLE (LIST İÇİN) $read = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & $a $RegRead1 = RegRead($read, "DisplayName") If $RegRead1 = "" And @error Then ContinueLoop If $name = "" Then $name = $RegRead1 Else $name = $name & "|" & $RegRead1 EndIf ;~ KALDIRMA KOMUTUNU OKU VE STRING'E EKLE (LIST İÇİN) $RegRead2 = RegRead($read, "UninstallString") If $command = "" Then $command = $RegRead2 Else $command = $command & "|" & $RegRead2 EndIf ;~ ARRAY'A İSİMLERİ, KOMUTLARI, ANAHTARLARI YERLEŞTİR $a = UBound($aName) + 1 ReDim $aName[$a] ReDim $aCommand[$a] ReDim $aKey[$a] $a = $a - 1 $aName[$a] = $RegRead1 $aCommand[$a] = $RegRead2 $aKey[$a] = $read WEnd GUICtrlSetData($List1, "") GUICtrlSetData($List1, $name) EndFunc ;==>Yenile Func Kaldir() Local $a, $b, $i $a = GUICtrlRead($List1) If $a <> "" Then $b = UBound($aName) - 1 For $i = 1 To $b Step +1 If $aName[$i] = $a Then $b = $aCommand[$i] ExitLoop EndIf Next If Run($ = 0 Then MsgBox(0, "Hata", "Kaldırma fonksiyonu çalıştırılamadı") EndIf Yenile() EndFunc ;==>Kaldir Func GirisiSil() Local $a, $b, $i $a = GUICtrlRead($List1) If $a <> "" Then $b = UBound($aName) - 1 For $i = 1 To $b Step +1 If $aName[$i] = $a Then $b = $aKey[$i] ExitLoop EndIf Next If MsgBox(4, "Soru", "Giriş: " & $aName[$i] & @CRLF & @CRLF & "Gerçekten silmek istiyormusun?") = 6 Then RegDelete($ EndIf Yenile() EndFunc ;==>GirisiSil[/code] Quote Link to comment Share on other sites More sharing options...
Sirius Posted January 24, 2012 Share Posted January 24, 2012 Teşekkür iletileri yazan üyelerin uyarıları itina ile verilmiştir. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.