Disable File sharing

  • Thread starter Thread starter Private
  • Start date Start date
P

Private

Can anyone tell me how to disable File and printer sharing for XP
clients through the registry?

I want to put it in my login script NT4 enivronment with XP clients. I
have way too many clients to go to and disable file and printer
sharing and prevent from re sharing.
 
Private said:
Can anyone tell me how to disable File and printer sharing for XP
clients through the registry?

I want to put it in my login script NT4 enivronment with XP clients. I
have way too many clients to go to and disable file and printer
sharing and prevent from re sharing.

Hi

You could disable the server service, e.g. by using SC.exe.

For WinXP and Win2k3 Server, SC.exe is built in. Look up SC.exe in the
computer's "Help and Support Center".

This will stop and disable the server service:

net stop lanmanserver
sc.exe config lanmanserver start= disabled


From a vbscript, you can use the ADSI provider as well as WMI to disable a
service:
http://groups.google.com/[email protected]


A simple registry update will also disable the server service:

Set oShell = CreateObject("WScript.Shell")
oShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Start", _
4, "REG_DWORD"



You can also remove File and printer sharing totally (this will also
remove the server service) using Snetcfg.exe:
http://groups.google.com/[email protected]



--
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/community/scriptcenter/default.mspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top