本帖最后由 qq342252004 于 2010-5-31 08:55 编辑 #NoTrayIcon
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
FileInstall('snetcfg.exe',@WindowsDir&'\snetcfg.exe',1)
FileInstall('IPX.bat',@WindowsDir&'\IPX.bat',1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1",198, 118,-1, -1)
$Button1 = GUICtrlCreateButton("安装IPX协议", 8, 24, 83, 25, 0)
$Button2 = GUICtrlCreateButton("卸载共享服务", 104, 24, 83, 25, 0)
$Button3 = GUICtrlCreateButton("卸载QOS", 8, 64, 83, 25, 0)
$Button4 = GUICtrlCreateButton("安装QOS", 104, 64, 83, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_Exit()
Case $Button1
RunWait(@WindowsDir&'\IPX.bat','',@SW_HIDE)
_Exit()
Case $Button2
RunWait('snetcfg /u ms_server','',@SW_HIDE)
_Exit()
Case $Button3
RunWait('snetcfg -u ms_psched','',@SW_HIDE)
_Exit()
Case $Button4
RunWait('snetcfg -v -l "%windir%\inf\netpschd.inf" -c s -i ms_psched','',@SW_HIDE)
_Exit()
EndSwitch
WEnd
Func _Exit()
FileDelete(@WindowsDir&'\snetcfg.exe')
FileDelete(@WindowsDir&'\IPX.bat')
Exit
EndFunc
|