[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1203
  • Last Modified:

Can't disable firewall using command line (XP SP3)

Hi all

I need to disable the Windows Firewall.

Previously on our XP SP2 images the following command worked perfectly as part of a runonceex take on first startup of the sysprep'd image:

netsh firewall set opmode mode=disable profile=all

We're now moving to SP3 (don't ask!!).  However, that command doesn't seem to have any affect.  Upon startup, the firewall service is happily running.

I've tried using the command after startup too, in case there was a syntax error.  Executing the command returns 'OK', but no changes to the service are made!!

Any advice would be appreciated.

Thanks in advance.
  • 4
1 Solution
The steps in this article are quoted to be for XP SP2 and SP3>
"How can I turn on or turn off the firewall in Windows XP Service Pack 2 or later versions?":
Ah, see if this helps>
Windows XP SP3 Enables The Firewall even If you have it disabled as a Group Policy! Quick Fix!:
So this work-a-round may be suitable, which is to create this line in the user login script:
sc config “SharedAccess” start= disabled
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

pacsadminwannabeSystems EngineerCommented:
I would recommend using group policy to perform this action
check out the technet site for more info.

Deploying Windows Firewall Settings With Group Policy
epoch-ukAuthor Commented:
Due to some complex scripting that's required for some of our more esoteric applications, we can't use group (or local) policy.

However, I'd completely forgotten about the 'SC config' command!!  Doh!

Thanks Jonvee ... solution accepted (and working).
Good! .... thank you.

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now