Puuuuuh Posted October 27, 2023 Share Posted October 27, 2023 herkese kolay gelsin arkadaşlar Cmd ve vbs üzerinde pek bilgim olmadığı için topluluğa soruyorum yapmak istediğim şey kısaca; netsh interface ip set address name="Local Area Connection" static 192.168.1.1 255.255.255.0 192.168.1.100 ve netdom /domain:test /user:test /password:test <bilgisayar adı> /joindomain kodlarını kullanarak cmd veya vbs üzerinden basit bir otomasyon yapmak bu kodların içinden ip set i ve bilgisayar adını bana sormasını ve elle girilmesini istiyorum bunu en kolay hangi şekilde yapabilirim? konuyu yanlış yere açmışsam özür dilerim Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted November 11, 2023 Share Posted November 11, 2023 #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 560, 310, -1, -1) $Group1 = GUICtrlCreateGroup("NetSh", 11, 8, 538, 177) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $Input1 = GUICtrlCreateInput("Local Area Connection", 32, 40, 496, 24) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $IPAddress1 = _GUICtrlIpAddress_Create($Form1, 32, 80, 354, 21) _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0") $IPAddress2 = _GUICtrlIpAddress_Create($Form1, 32, 112, 354, 21) _GUICtrlIpAddress_Set($IPAddress2, "0.0.0.0") $IPAddress3 = _GUICtrlIpAddress_Create($Form1, 32, 144, 354, 21) _GUICtrlIpAddress_Set($IPAddress3, "0.0.0.0") $Button1 = GUICtrlCreateButton("Run", 400, 78, 130, 88) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("NetDom", 11, 192, 538, 105) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $Input2 = GUICtrlCreateInput("", 32, 236, 354, 24) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $Button2 = GUICtrlCreateButton("Run", 400, 222, 130, 49) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $str = GUICtrlRead($Input1) $ip1 = _GUICtrlIpAddress_Get($IPAddress1) $ip2 = _GUICtrlIpAddress_Get($IPAddress2) $ip3 = _GUICtrlIpAddress_Get($IPAddress3) $cmd = "netsh interface ip set address name=" & '"' & $str & '"' & " static " & $ip1 & " " & $ip2 & " " & $ip3 RunWait(@ComSpec & " /c " & $cmd) Case $Button2 $str2 = GUICtrlRead($Input2) $cmd2 = "netdom /domain:test /user:test /password:test " & $str2 & " /joindomain" RunWait(@ComSpec & " /c " & $cmd2) EndSwitch WEnd 2 Quote Link to comment Share on other sites More sharing options...
Puuuuuh Posted November 22, 2023 Author Share Posted November 22, 2023 çok teşekür ediyorum verdiğiniz kodları iskelet alıp sıfır bilgiyle bu hale getirdim hepsi sizin sayenizde çok sağ olun [url=https://hizliresim.com/a7d9rcq][img]https://i.hizliresim.com/a7d9rcq.png[/img][/url] Quote Link to comment Share on other sites More sharing options...
Puuuuuh Posted January 2 Author Share Posted January 2 kesinlikle düşünüyordum ama stabil çalıştıramadım, cmd ve powershell kodları tutarlı çalışmadı eksik kaldım, paylaşacak bişey çıkmadı yani ortaya malesef 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.