Mehmet Posted March 12, 2012 Share Posted March 12, 2012 (edited) değiştir butonuna tıkladığımda inputda farklı pc ismi yazdıysam regeditde ilgili anahtara yazmasını istiyorum ama yapamadım [codebox] #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> global $computername $guim = GUICreate("PC AD DEĞİŞTİR", 311, 591, 192, 125) $computername = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName") ;$regadgir = RegWrite("\\" & $inputbox & "\HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName', 'ComputerName', 'REG_SZ','') $inputbox = GUICtrlCreateInput($computername,108,336) GUICtrlSetTip(-1, "BİR AD GİRİNİZ") $pcadi = GUICtrlCreateLabel("Bilgisayar adı", 176, 312, 65, 17) $degistir = GUICtrlCreateButton("Değiştir", 176, 368, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $degistir ;$regadgir adgirdi() EndSwitch WEnd Func adgirdi() $computername = GuiCtrlRead($inputbox) EndFunc [/codebox] Edited March 12, 2012 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted March 12, 2012 Share Posted March 12, 2012 <> operatörü ile bir koşullanma oluşturdun mu ? Mobilim tam göremiyorum kodları. Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 12, 2012 Share Posted March 12, 2012 [codebox]#include <GUIConstantsEx.au3> Global $guim = GUICreate("PC AD DEĞİŞTİR", 311, 591, 192, 125) ;$regadgir = RegWrite("\\" & $inputbox & "\HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName', 'ComputerName', 'REG_SZ','') Global $inputbox = GUICtrlCreateInput(RegRead("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName"), 108, 336) GUICtrlSetTip(-1, "BİR İSİM GİRİNİZ") GUICtrlCreateLabel("Bilgisayar adı", 176, 312, 65, 17) Global $degistir = GUICtrlCreateButton("Değiştir", 176, 368, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $degistir _RenameComputer() EndSwitch WEnd Func _RenameComputer() Local $Read_Com_Input = StringStripWS(GUICtrlRead($inputbox), 3) Local $Read_Reg_Input = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName") If $Read_Com_Input = $Read_Reg_Input Then Return 0 If $Read_Com_Input = "" Then GUICtrlSetData($inputbox, $Read_Reg_Input) GUICtrlSetState($inputbox, 256) Return SetError(1, 0, 0) EndIf ;~ RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName", "ComputerName", "REG_SZ", $Read_Com_Input) RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName", "REG_SZ", $Read_Com_Input) ;~ RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $Read_Com_Input) ;~ RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $Read_Com_Input) ;next line is not really needed, but makes things easier during initial config. It just sets the default domain to the new local machine name. ;~ RegWrite("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", $Read_Com_Input) EndFunc ;==>_RenameComputer[/codebox] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted March 12, 2012 Author Share Posted March 12, 2012 (edited) blue_life devredışı bıraktığınız regedit anahtarları var sanırım bu RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName", "ComputerName", "REG_SZ", $Read_Com_Input) bilgisayara reset atmadan değiştiriyor diğerlerini bilmiyorum ama aktif etsem negibi değişiklikler olur Edited March 12, 2012 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 12, 2012 Share Posted March 12, 2012 @MeHMeTBeN İlgili reg satırlarını autoit forumundan almıştım. Açıkçası fazla bir fikrim yok Quote Link to comment Share on other sites More sharing options...
Mehmet Posted March 30, 2012 Author Share Posted March 30, 2012 @blue_life regedit anahtarımız sadece bu şekilde ise [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] veya [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg] Run yada startupreg anahtarı altında olanları Checkboxlara yazdırabilirmiyiz Başlat çalıştır msconfig başlangıçda çalışan programları kaldırıyorum kendini [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg] buradaki anahtar adı altına atıyor dolasıyla oradanda silmemiz gerekiyor Quote Link to comment Share on other sites More sharing options...
blackman12 Posted March 30, 2012 Share Posted March 30, 2012 for $i = 1 to 20 MsgBox(0,"",RegEnumVal("HKEY_CURRENT_USER\Software\HavvaDurumu",$i)) Next Quote Link to comment Share on other sites More sharing options...
Mehmet Posted March 30, 2012 Author Share Posted March 30, 2012 (edited) yardım dosyasında böyle bir örnek vardı ama ben pek mantığı kuramadım çünki ini dosyasına yazıyor blackman12 üstad sen dahada zorlaştırdın MsgBox örneği değilde Checkbox örneği verseydin keşke ama run adı altında kaçtane program çalışıyor bunu tahmin edemeyiz kaçtane checkbox yapıcaz [codebox] $sIni = @DesktopDir & "\Aboo.ini" For $i = 1 To 10 $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i) IniWriteSection($sIni,"List Startup",$var) If @error Then ExitLoop Next $chars = FileRead($sIni) MsgBox(0,"",BinaryToString($chars)) [/codebox] Edited March 30, 2012 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
blackman12 Posted March 30, 2012 Share Posted March 30, 2012 [code]Opt("GUIResizeMode", 802) Dim $checkler[1] = [0] $yol = "HKEY_CURRENT_USER\Software\HavvaDurumu" $gui = GUICreate("deneme",200,200,0,20) GUICtrlSetResizing (-1, 856);burayı hatırlayamadım $y = 25 for $i = 1 to 100000 $reg = RegEnumVal($yol,$i) if $reg = "" Then ExitLoop Else ReDim $checkler[$i] $checkler[$i-1] = GUICtrlCreateCheckbox($reg,20,$y,200,20) $y += 25 EndIf Next WinMove($gui,"",Default,Default,200,$y + 50) GUISetState() While 1 $nmsg = GUIGetMsg() if $nmsg = -3 Then Exit Elseif $nmsg = $checkler[2] Then MsgBox(0,"","deneme") EndIf WEnd[/code] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted March 31, 2012 Author Share Posted March 31, 2012 (edited) blackman12 oldu sanırım ama eksik gösteriyor [img]http://www.tnctr.com/uploads/imgs/pre_1333203500__msconfig.jpg[/img] Edited March 31, 2012 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted March 31, 2012 Share Posted March 31, 2012 Çünkü o ögeler tek bir anahtar altında değil. Bir kısmı Current Userde depolanıyor, bir kısmı Local Machinede. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 3, 2012 Author Share Posted April 3, 2012 blue_lifenin Regopenkey V1.5 olan çalışmasındaki gibi ben daha önceden belirlemiş olduğum bir kayıt defteri anahtarına ulaşmak için bir butona tıkladığımda direk kayıt defterindeki o alanı açmasını istiyorum nasıl yaparım HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run ve HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'UnlockerAssistant', 'REG_SZ','" bir başka sorumda RegEnumKey RegEnumVal ile aynımı Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted April 3, 2012 Share Posted April 3, 2012 [b]Aynı değil elbette. Birinde belirtilen konumdaki anahtar isimlerini çeker, diğerinde ise belirtilen anahtardaki değerleri çeker.[/b] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 3, 2012 Author Share Posted April 3, 2012 peki bir butona tıkladığımda bu anahtarları açmak için hangi komutu kullanıyoruz.? HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run veya HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'UnlockerAssistant', 'REG_SZ','" 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.