Question
-
Topic
-
How can I disable the NIC of another pc using vbscript from my pc?
Lockedi have here a vbscript code that disables a NIC and i designed it to work with windows 7.
——————————————————————————————————————————-
‘disable.vbsCONST CSIDL_CONNECTIONS = 49
set shellApp = CreateObject(“Shell.Application”)
set oNetCon = shellApp.Namespace(CSIDL_CONNECTIONS)sLocalAreaConnection = “Local Area Connection”
set oLanCon = nothing
for each FolderItem in oNetCon.Items
if FolderItem.Name = sLocalAreaConnection then
set oLanCon = FolderItem
end if
nextfor each verb in oLanCon.verbs
if verb.name = “En&able” then
verb.DoIt
end ifif verb.name = “Disa&ble” then
verb.DoIt
end if
nextwscript.sleep 1000
——————————————————————————————————————————-
I also have another vbscript to run ‘disable.vbs’ on another pc but it gives me an error message.
——————————————————————————————————————————-
‘send_disableScript.vbsset oController = CreateObject(“WSHController”)
set oProcess = oController.CreateScript(“C:\Users\Blue_Rabbit\Desktop\disable.vbs”, “\\BLUE_RABBIT_PC\Users\Blue_Rabbit\Desktop”)
oProcess.Execute
While oProcess.Status <> 2
WScript.Sleep 100
WEnd
——————————————————————————————————————————-
Running ‘send_disableScript.vbs’ gives me the error message:Error: The remote server machine does not exist or is unavailable
Code: 800A01CE