日期:2014-05-17 浏览次数:21102 次
OPTION EXPLICIT
DIM ICSSC_DEFAULT, CONNECTION_PUBLIC, CONNECTION_PRIVATE, CONNECTION_ALL
DIM NetSharingManager
DIM PublicConnection, PrivateConnection
DIM EveryConnectionCollection
DIM objArgs
DIM priv_con, publ_con
dim switch
ICSSC_DEFAULT = 0
CONNECTION_PUBLIC = 0
CONNECTION_PRIVATE = 1
CONNECTION_ALL = 2
Main()
sub Main( )
Set objArgs = WScript.Arguments
if objArgs.Count = 3 then
priv_con = objArgs(0)
publ_con = objArgs(1)
switch = objArgs(2)
if Initialize() = TRUE then
GetConnectionObjects()
FirewallTestByName priv_con,publ_con
end if
else
DIM szMsg
if Initialize() = TRUE then
GetConnectionObjects()
FirewallTestByName "list","list"
end if
szMsg = "To share your internet connection, please provide the name of the private and public connections as the argument." & vbCRLF & vbCRLF & _
"Usage:" & vbCRLF & _
" " & WScript.scriptname & " "&nb