Turning off Simple File Sharing via a script

  • Thread starter Thread starter Tad
  • Start date Start date
T

Tad

Is there a way to script the turning off of simple file
sharing and windows messaging via a script. I can update
these by updating the security template, but I was
wondering if this could be done via a script.
 
Yes, it can be done. But for Windows Messenging, are you referreing to the
Messenger Service, or the Windows Messenger Application?
 
Copy and paste the following into a Notepad file and save it with a VBS
extension

On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")

WshShell.RegWrite
"HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest",0,"REG_DWORD"
WshShell.Run "net stop Messenger"


You will probably have to run this from an Administrator level account, or
with Administrator level credentials.

--
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
 
Thanks that works great and it is a hell of a lot faster
than updating the security template.

I owe ya one. If your ever in St.Louis I'll buy ya a beer
or a root beer if thats your preference.

If you care to take me up on this reply to my email
address instead of the list.

Thanks again
 
Back
Top