Bon, quand je test sur un script vierge ca fonctionne, par contre quand je l'applique à mon script ca ne me demonte pas le lecteur réseau.
► Afficher le texte
#include <WinNet.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;DriveMapAdd ("X:", "\\172.16.20.200\informatique", 0, "admin", "scaclogix")
$drive = DriveMapAdd ("*", "\\192.168.0.50\Marseille$", 0)
#Region ### START Koda GUI section ### Form=c:\users\laurent\desktop\autoit\infotools\scripts\infotools-v1.kxf
$Form1_1 = GUICreate("InfoTools", 420, 426, 192, 124)
$Group1 = GUICtrlCreateGroup("Microsoft Office 2007", 16, 288, 193, 121)
$Button1 = GUICtrlCreateButton("Installer", 24, 312, 137, 33)
$Button2 = GUICtrlCreateButton("Désinstaller", 24, 360, 137, 33)
$Icon1 = GUICtrlCreateIcon("", -1, 176, 312, 25, 33)
$Icon2 = GUICtrlCreateIcon("", -1, 176, 360, 25, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Compte Admin Local", 16, 152, 193, 121)
$Button3 = GUICtrlCreateButton("Activer Admin local", 24, 176, 137, 33)
$Button4 = GUICtrlCreateButton("Reset mot de passe", 24, 224, 137, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Sauvegarde données local", 16, 16, 193, 121)
$Button5 = GUICtrlCreateButton("Sauvegarde", 32, 40, 129, 33)
$Button6 = GUICtrlCreateButton("Restauration", 32, 88, 129, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Outils", 232, 16, 169, 257)
$Button8 = GUICtrlCreateButton("Base de registre", 248, 80, 129, 33)
$Button9 = GUICtrlCreateButton("Connexion réseau", 248, 120, 129, 33)
$Button11 = GUICtrlCreateButton("Propriétés système", 248, 160, 129, 33)
$Button10 = GUICtrlCreateButton("Deco. lecteur réseau", 248, 200, 129, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button7 = GUICtrlCreateButton("Invite de commande", 248, 40, 131, 33)
$Group5 = GUICtrlCreateGroup("Open Office", 232, 288, 169, 121)
$Button12 = GUICtrlCreateButton("Installer", 248, 312, 131, 33)
$Button13 = GUICtrlCreateButton("Désinstaller", 248, 360, 129, 33)
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
ShellExecute("X:\AutoIt\InfoTools\Executables\InstallationOffice.exe")
case $button2
ShellExecute("X:\AutoIt\InfoTools\Executables\desinstallationOffice.exe")
case $button3
ShellExecute("LUSRMGR.MSC")
case $button5
ShellExecute("X:\AutoIt\InfoTools\Executables\Sauvegarde-RECUP.exe")
case $button6
ShellExecute("X:\AutoIt\InfoTools\")
case $button8
ShellExecute("regedit")
case $button9
ShellExecute("ncpa.cpl")
case $button11
ShellExecute("sysdm.cpl")
case $button7
ShellExecute("cmd")
case $button10
DriveMapDel ("X:")
case $button12
ShellExecute("X:\AutoIt\InfoTools\Executables\InstallationOpenOffice.exe")
case $button13
ShellExecute("X:\AutoIt\InfoTools\Executables\DesinstallationOpenOffice.exe")
_WinNet_CancelConnection($drive , True)
EndSwitch
WEnd
Je ne vois pas pourquoi sur un script vierge ca marche et pas sur le mien.
Edit : Meme en mettant le "_WinNet_CancelConnection($drive , True)" après "WEnd"