安装代理的脚本

用给定的共享路径作为参数来装代理

On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")

argCount = WScript.Arguments.Count

if (argCount>5) then
    ' Get Location and arguments of the script
    msiFile = WSCript.Arguments.Item(0)
    PROTOCOL = WSCript.Arguments.Item(1)
    SERVERIP = WSCript.Arguments.Item(2)
    SERVERNAME = WSCript.Arguments.Item(3)
    PORT = WSCript.Arguments.Item(4)
    AGENTPORT = WSCript.Arguments.Item(5)
    wshshell.Run "msiexec.exe /i """&msiFile&""" ENABLESILENT=yes REBOOT=ReallySuppress PROTOCOL="&PROTOCOL&" SERVERIP="&SERVERIP&" SERVERNAME="&SERVERNAME&" PORT="&PORT&" AGENTPORT="&AGENTPORT&" /qn",0,True
end if

Back to Top