Stop Firewall service for Windows XP and WIN 7

(imported topic written by jpeppers91)

I’m trying to create a task that will disable the firewall in one task. If the OS is WIN xp it will disable sharedaccess service, if its WIN7 it will disable the WIN7 service. I have the command to disable the service but not sure how to do the if then statement.

If name of operating system is “WIN XP”

do this

end if

if name of operating system is Win7"

do this

end if

(imported comment written by SystemAdmin)

if { name of operating system is “WinXP” }

…do this…

endif

if { name of operating system is “Win7” }

…do this…

endif

  • OR -

if {relevance 1}

…do this…

else if {relevance 2}

…do this…

else

Neither of the above, so…?

endif

-Jim