|
VBS脚本应用-无界面安装ISCSI并连接ISCSI(3) For Each objItem in colItems For Each objAddress in objItem.IPAddress If objAddress <> "" then GetIP = objAddress Exit For End If Next Next End Function
'On Error Resume Next Dim oshell,fso,WshNetwork,pcnum,pcname,port Set oShell = WScript.CreateObject("WScript.Shell") set fso = CreateObject("Scripting.FileSystemObject") set WshNetwork = WScript.CreateObject("WScript.Network") pcname = WshNetwork.ComputerName pcnum = CInt(Right(pcname,3))'客户机后缀
setupfile = "iscsi2.0.exe" '客户端安装文件路径 serverip = "192.168.0.250" '服务器ip
port = "3260"
if not fso.fileexists(oshell.ExpandEnvironmentStrings("%WinDir%")+"\system32\iscsicpl.cpl") then
|