Re: Disable/enable file and print sharing with group policy



Wow. All those group policy objects and not one on file and print sharing?
Bummer. Thanks for the suggestion. When I get back from vacation I'll look at
it closer.
Later,
pepe

"Torgeir Bakken (MVP)" wrote:

> 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: printer problems migrating from Netware 6.5 to 2003
    ... It doesn't install the printer for users. ... If we use group policy to deploy a printer, let us say, we deploy a logon ... It is true that the script will be running every time the ... Microsoft Online Partner Support ...
    (microsoft.public.windows.server.migration)
  • Re: Disable/enable file and print sharing with group policy
    ... When we installed all of our workstations, we did so with file and print sharing disabled. ... we would like to push an antivirus client install and it needs file and print sharing enabled. ... I suggest you use a computer startup script that runs as ...
    (microsoft.public.windows.server.active_directory)
  • Re: Use Group Policy to assign computer startup scripts for 2007 Office deployment
    ... If the source bits are on a network share somewhere then running as a startup (or shutdown) script runs in the context of the computer account, and so the computer account has to have read permissions on the share and files within the share. ... Simplify Group Policy Troubleshooting with the NEW GPExpert Troubleshooting Pak 1.0 at http://www.sdmsoftware.com/products.php ... It could be that the timing of the shutdown script is preventing a long-running task like an office install from running. ...
    (microsoft.public.windows.group_policy)
  • Re: deploying office 2003 with MST file
    ... it will allow that user to install any programs. ... a script to only install the program once(everyone here has one generic ... > Kevin, you can use grup policy to have the required elevated priviledges ... >> Group Policy wants an MSI file so I am not sure how to deploy is using ...
    (microsoft.public.outlook.installation)
  • Detect and Repair needed after SP2 upgrade - Any easy way to force it?
    ... then use Group Policy to force it to update itself. ... updated our install point to include Office 2003 SP2 and used GP to ... running a detect and repair, the problem is fixed but now I have around ... easily so if there is a way to script it, ...
    (microsoft.public.officeupdate)