Create firewall "profiles" for Windows 7 [duplicate]

Solution 1:

(You can view this guide with images here)

  1. Before doing anything, back up your current firewall policy. Run Windows Firewall with Advanced Security (type firewall in Run box).

  2. In the right pane, click Export Policy. Save to c:\, as firewallstd.wfw.

  3. Create the policies you wish to implement, and export as c:\firewallstrict.wfw.

  4. Create this batch file, and save as c:\firewallstd.bat:

    netsh advfirewall import c:\firewallstd.wfw
    pause
    
  5. Create this batch file, and save as c:\firewallstrict.bat:

    netsh advfirewall import c:\firewallstrict.wfw
    pause
    
  6. Open Task Scheduler (type task in Run box).

  7. Choose Create a Basic Task.

  8. Name this rule as you see fit.

  9. For task trigger, select When I Log on.

  10. Choose Start a Program.

  11. Choose the .BAT file you created earlier. The finishing dialog will appear. Before clicking Finish, tick "Open the Properties dialog for this task when I click Finish".

  12. In the resulting window, select Run with Highest Privileges.

Once this is complete, log on to the other account and repeat steps 6 through 12, with the policies you desire for that account. You can remove the "pause" from the batch file if you prefer, but it is helpful to confirm that the policy has properly loaded upon logging in.