ayant cherché sur le net et sur le site, pas une seule page ne m'a aidé.
Je veux intégrer un serveur avec la ligne RunWait.... netdom........
Il plante à la ligne RUNWAIT et je ne voit pas pourquoi, si quelqu'un peut me venir en aide
variable utilisé
$user
$mdp
$domain
$Svrname
voici un morceau de mon script
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstants.au3>
#include <Constants.au3>
#Include <array.au3> ; uniquement pour _ArrayDisplay()
#Include "network.au3"
;~ #include <ButtonConstants.au3>
;~ #include <ComboConstants.au3>
;~ #include <EditConstants.au3>
;~ #include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <EditConstants.au3>
#Include <File.au3>
#include <EventLog.au3>
#Include <Security.au3>
#include <GuiConstantsEx.au3>
#include <ButtonConstants.au3>
$domain = "domain"
$user = "admin"
&$mdp = "************"
; TABLEAU de RENSEIGNEMENT
Dim $CompName, $Workgroup, $dir_create
FileInstall ("D:\icone.jpg", "C:\TEMP\icone.jpg")
$Form1_1 = GUICreate("Configuration du serveur", 800,500, 200, 150, BitOR($WS_SYSMENU, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER))
GUICtrlCreatePic("C:\TEMP\icone.jpg", 0, 0,800,500,$SS_BITMAP)
$font = "Comic Sans MS"
GUISetFont(15, 4000, 6, $font) ; will display underlined characters
$server1 = GUICtrlCreateLabel("Renommage du serveur ", 150, 20, 400, 30,$WS_EX_TRANSPARENT)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$font = "Comic Sans MS"
GUISetFont(9, 400, 2, $font) ; will display underlined characters
$inp_name1 = GUICtrlCreateLabel("Nom du serveur", 100, 100)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$inp_name = GUICtrlCreateInput("", 100, 120, 185, 25)
$set = GUICtrlCreateButton("Suivant", 700, 450, 89, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $set
Set_Names()
EndSwitch
WEnd
Func Set_Names()
; Nom serveur
$CompName = GUICtrlRead($inp_name, 1)
GUICtrlSetState($inp_name, $GUI_DISABLE)
; Modification de la base de registre
RegDelete ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname")
RegDelete ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname")
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\Computername", "Computername", "REG_SZ", $CompName)
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername", "Computername", "REG_SZ", $CompName)
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $CompName)
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $CompName)
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AltDefaultDomainName", "REG_SZ", $CompName)
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", $CompName)
RegWrite ("HKEY_USERS\.Default\Software\Microsoft\Windows Media\WMSDK\General", "Computername", "REG_SZ", $CompName)
;~ ; Intégration domaine
RunWait("C:\TEMP\Netdom.exe JOIN COMPUTERNAME /DOMAIN:" & $domain &" /UserD:"&$user &"/PasswordD:"&$mdp,"",@SW_HIDE)
EndFunc ;==>Set_Names
Func CLOSEClicked()
;~ run ("shutdown -r -t 0")
Exit
EndFunc ;==>CLOSEClicked


