|
楼主 |
发表于 2009-6-15 14:39:13
|
显示全部楼层
$inipath = @ScriptDir& "\" &"update.ini"
$runa=IniRead($inipath, "A区", "程序", "")
$runb=IniRead($inipath, "B区", "程序", "")
$runc=IniRead($inipath, "C区", "程序", "")
$rund=IniRead($inipath, "D区", "程序", "")
Local $HostNameA
$HostName = StringSplit(IniRead($inipath, "A区", "机器列表", ""), ",")
for $i = 1 to $HostNameA[0]
If @ComputerName=$HostNameA[$i] Then
run($runa)
EndIf
Exit
Local $HostNameB
$HostName = StringSplit(IniRead($inipath, "B区", "机器列表", ""), ",")
for $i = 1 to $HostNameB[0]
If @ComputerName=$HostNameB[$i] Then
run($runb)
EndIf
Exit
Local $HostNameC
$HostName = StringSplit(IniRead($inipath, "C区", "机器列表", ""), ",")
for $i = 1 to $HostNameC[0]
If @ComputerName=$HostNameC[$i] Then
run($runc)
EndIf
Exit
Local $HostNameD
$HostName = StringSplit(IniRead($inipath, "D区", "机器列表", ""), ",")
for $i = 1 to $HostNameD[0]
If @ComputerName=$HostNameD[$i] Then
run($rund)
EndIf
Exit
这样写还是不行啊 |
|