Re: Disable/enable file and print sharing with group policy
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
pepe wrote:
Can someone please help me find the object in group policy that i can use to
disable/enable file and print sharing. When we installed all of our
workstations, we did so with file and print sharing disabled. Now, we would
like to push an antivirus client install and it needs file and print sharing
enabled. After the install, we will disable it again.
Hi,
There is nothing in group policy that can help you here.
You might get something to work with snetcfg.exe.
If you want to use Snetcfg.exe to _enable_ File & Print Sharing (F&PS
already installed, but the checkbox is not checked), you will have to
uninstall F&PS first, and then install again (using snetcfg.exe for
both tasks). This will make the checkbox checked.
Also note that uninstalling F&PS will remove the server service.
I suggest you use a computer startup script (with a GPO) that runs as
part of the boot up process (before the user logs in). It runs under
the system context and has admin rights.
To be able to access files over the network from the computer startup
script, you could put the file(s) on a network share and grant read
access for the AD group "Domain Computers" to the share.
Alternatively, from the startup script, you could map a drive on
the fly, like this:
sDomainUser = "arp.corp\computer_fix"
sPswd = "something"
Set oNetwork = CreateObject("Wscript.Network")
oNetwork.MapNetworkDrive _
"Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd
More about snetcfg.exe and F&PS here:
http://groups.google.co.uk/group/microsoft.public.scripting.vbscript/msg/bc2ef5a6df39fdad?dmode=source
Also, it looks like you can combine parsing the output from
nbtstat.exe -n and checking the server service existence to obtain
current status:
http://groups.google.co.uk/group/microsoft.public.scripting.wsh/msg/7709954edf163021?hl=en
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
.
Relevant Pages
- Re: Disable/enable file and print sharing with group policy
... All those group policy objects and not one on file and print sharing? ... After the install, ... > I suggest you use a computer startup script that runs as ... (microsoft.public.windows.server.active_directory) - Re: Deploying Office 07 with Group Policy
... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ... (microsoft.public.office.setup) - Re: [opensuse] Editting PATH variable
... SuSEconfig script ... ... not knowing what you options you used to install ... If your unfamiliar with Bash a good book is 'Learning the Bash Shell' by ... For Java use editing the PATH variable is NOT required... ... (SuSE) - Re: KB911280 update problem
... Microsoft is working on an amended patch which will address this issue. ... Microsoft advises anyone affected by this to not install the patch and to ... That script is broken by the patch. ... He said he could not write a bug report ... (microsoft.public.windowsupdate) - help with a home network jumpstart
... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ... (SunManagers) |
|