Disable XP firewall using batch file

Created this as was forever doing it on machine where it was decided not to roll it out over AD. So I did it on an individual bases. Annoying having to go to gpedit.msc all the time to set these settings. So created a batch file to put it directly into the registry, just when gpedit puts it.

Stick the following in a cmd window or in a batch file.

REG ADD HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile /v EnableFirewall /t REG_DWORD /d 0
REG ADD HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile /v EnableFirewall /t REG_DWORD /d 0

What it’s doing:

REG ADD = Adds an entry to the registry.
/v is the Value name that appears under the selected key (In the above example it’s EnableFirewall. This will appear under DomainProfile and StandardProfile as in the image)

Firewall

/t is the RegKey type in this case it’s a DWORD so you put REG_DWORD

/d is the data you want in it. In this case we want it set to 0. Because it’s set to 0 this bit isn’t actually needed. As adding EnableFirewall as a DWORD it appears to automatically default it to no value, 0. I just included it in the batch file so I knew what the batch file was doing.

And that’s it. Disadvantage I’ve found using the batch file instead of gpedit.msc is that after you run it, it won’t take effect until you reboot. Also if you then check gpedit, it will just said Not Configured. If you then want to use gpedit to config it. You have to set the gpedit entry to disabled, maybe doing gpupdate /force (you can get away with not having to do that most times) and then set it back to Not Configured. Then it will remove the reg entries.

Other than that, appears to work fine.

Info on the REG command can be found here. This helped me create the batch.

http://www.petri.co.il/reg_command_in_windows_xp.htm

XP Firewall issue

UPDATE:

Better command is this

REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Security /f
REG DELETE HKLM\SOFTWARE\Classes\AppID\{ce166e40-1e72-45b9-94c9-3b2050e8f180} /f

Stick that in a batch file and run it. It appears to fix the issue totally then. Also referenced on the MS link below.

END UPDATE

You attempt to start the Firewall in control panel and get this.

Firewall

Then this

Firewall

Run a CMD as admin and type or paste this into it

SC sdset SharedAccess D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

Then you should see this and it should say, as does here, SUCCESS if it’s worked. Normally fails if you don’t run the CMD as admin

Firewall

More info on this here

http://support.microsoft.com/kb/892199

How can I stop users from installing Windows Installer (MSI) files for removable media?

Posted as this was preventing me from installing an .MSI

http://www.windowsitpro.com/article/installation2/how-can-i-stop-users-from-installing-windows-installer-msi-files-for-removable-media-.aspx

With Windows Installer 1.1 and later, you can restrict users from browsing MSI files on removable media such as CD-ROMs and DVDs by performing the following steps:

1. Start a registry editor (e.g., regedit.exe).
2. Navigate to the HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer registry subkey (create this subkey if it doesn’t exist).
3. From the Edit menu, select New, DWORD Value.
4. Enter the name DisableMedia, then press Enter.
5. Double-click the new value, set it to 1, then click OK.
6. Close the registry editor.
7. Log off and log on for the change to take effect.

How to grant Send On Behalf Of permission

“Send on Behalf Of” allows one user to be able to send emails on behalf of another. The message will show the recipient who the message was sent on behalf of and who actually sent the message.
There are two ways of granting “Send on Behalf Of”:
• via Outlook
allowing a user to grant others to send on their behalf
• via Active Directory Users and Computers
which can be performed by system managers only
Grant Send on Behalf of via Outlook
This procedure will allow you to grant other users the ability to send on your behalf:
1. Start Outlook
2. Tools → Options, select the “Delegates” tab
3. Click on [Add …]
4. Add the user or users that you want to grant the send-on-behalf-of permission to, then click [OK]
5. The next window will allow you to specify which permissions you are granting. To allow send-on-behalf-of, you need to grant permissions on the “Inbox” to either “Author” or “Editor”, then click [OK]
6. Click [OK] to close the “Options” dialog.
Note:
• The above has been demonstrated to work when using Outlook 2003, but not with Outlook 2000 connected to a Exchange 2003 server (I have not had time to identify why).
• See also “How to send a message on behalf of another”
Grant Send on Behalf of via Active Directory Users and Computers
This procedure will allow system managers to grant users the ability to send on the behalf of other users:
1. Log onto the server running Exchange.
2. Run Active Directory Users and Computers.
3. Find the user’s account that you want to be able to send on behalf of, and open up the account properties.
4. Select the “Exchange General” tab.
5. Click [Delivery Options…]
6. Click [Add …] and add the user (or users) that are to be granted permission to send on behalf of this account.
7. Click [OK] to close the “Delivery Options” dialog.
8. Click [OK] to close the account properties dialog..
See also “How to send a message on behalf of another”.
How to Send a Message on Behalf of Another
To send an email on behalf of another (assuming you have been granted the necessary send-on-behalf-of privilege):
1. Start Outlook.
2. Go to your Inbox.
3. Click [New] to start a new mail message.
4. If the message does not show a “From” field then pull down the “View” menu and check “From Field”.
Note: I have noticed that if you have Outlook set to use Microsoft Word then the “From Field” does not appear in the “View” menu. The work around is to clear the option to use Word (Outlook → Tools → Options → Mail Format → Use Microsoft Office Word 2003 to edit e-mail messages), you will then be able to show the From field, and this remains even if you re-select to use use Word to edit emails.
5. Click [From…] and select the account that you wish to send an email on behalf of.
6. Compose the email as normal.
Note:
• When you try to send the email you will get an error if you have not been granted the necessary send-on-behalf-of permission.
• To the recipient the email will show both the true author and who it was sent on behalf of.

http://www.cryer.co.uk/brian/msexchange/exch_howto_grant_send_on_behalf_of.htm#SendOnBehalfOf