Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Set firewall = CreateObject("HNetCfg.FwMgr")
Set firewallPolicy = firewall.LocalPolicy.CurrentProfile
Status = firewallPolicy.FirewallEnabled
If Status = 0 then
end if bled
Open in new window
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
if objPolicy.FirewallEnabled = FALSE then
wscript.echo "my firewall is disabled"
clist = "computers.txt"
Const FOR_READING = 1
const HKEY_LOCAL_MACHINE = &H80000002
const strKeyPath = "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\"
const strValueName = "EnableFirewall"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(clist) Then
Set objTextStream = objFSO.OpenTextFile(clist, FOR_READING)
WScript.Echo "Input file " & clist & " not found."
Do Until objTextStream.AtEndOfStream
strComputer = objTextStream.ReadLine
On Error Resume Next
Set oReg=GetObject( _
strComputer & "\root\default:StdRegProv")
if err.number = 0 then
if dwValue <> 0 then
WScript.Echo strcomputer & " : " & "Enabled"
WScript.Echo strcomputer & " : " & "Disabled"
WScript.Echo strcomputer & ": Error#:" & err.number & " : " & err.description
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.