Automate Windows 7's file sharing and firewall settings

Posted by nhinkle on Super User See other posts from Super User or by nhinkle
Published on 2010-04-30T23:28:33Z Indexed on 2010/04/30 23:39 UTC
Read the original article Hit count: 629

I am working with my school to customize Windows 7 on some new laptops we are receiving. The laptops come with Windows 7 Professional already installed, and we do not need or want to reimage them. We would however like to customize the installation once it is in place, through a series of scripts. We will also be deploying these scripts to computers which have already been set up.

Most of the settings we wish to change can be done easily from the command line or with a registry file. However, there is one thing we keep getting hung up on: networking options. Is there any unattended way to set the Windows 7 networking configuration? We would like to set the following things automatically, which are found under Control Panel > Network and Sharing Center > Advanced sharing settings > Home or Work network:

  • Turn on network discovery
  • Turn on printer and file sharing
  • Turn off public folder sharing
  • Turn on password protected sharing
  • Use user accounts and passwords to connect to other computers

We also need to configure the firewall to allow the following exceptions:

  • File and printer sharing
  • Remote assistance
  • Remote desktop
  • Remote scheduled tasks management
  • Remote service management
  • Windows remote management

I've looked around, and can't find any way to change these things - I looked into netsh, registry settings, and even used RegMon to watch while I changed the values manually, all to no avail. Google hasn't offered up anything helpful so far. If anyone could provide some insight, I would very much appreciate it. I did find out that much of this is configurable with group policy, but because these computers are in a workgroup, not a domain, I don't know of any way to take advantage of that in an unattended manner.

© Super User or respective owner

Related posts about windows-7

Related posts about unattended