Discussion Locked

DOWNLOAD: Windows XP File Sharing Interface Switcher VB script

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Windows XP Pro's Simple File Sharing interface makes it easy to set up common file sharing arrangements, but doesn't allow you to set individual NTFS permissions for each user--a task the Classic File Sharing interface found in Windows 2000 allowed. The Windows interface lets you manually disable the Simple File Sharing feature and enable the Classic File Sharing interface, but this can be a tedious process.

Our Windows XP Pro File Sharing Interface Switcher VB script lets you switch between the Simply File Sharing interface and the Classic File Sharing interface with a simple mouse click.

Check out the tool:
https://www.techrepublic.com.com/5138-10877-5713789.html

Then join this ongoing discussion and let us know if you find the Windows XP File Sharing Interface Switcher VB script useful and if there's anything we can do to improve the tool.

10 replies

by Greg Shultz

Hey folks!

As the author of this little time-saving utility, I just thought I drop a note in the discussion to ask for some feedback.

Do you find this type of tool useful in your day-to-day work?

Do you have an idea for a similar tool for a task that you perform often?

If you have any ideas or comments, please take a moment to let us know.

Thanks

Greg

by Greg Shultz

I apologize for any inconvenience...

I inadvertently submitted a version of the File Sharing Interface Switcher that was missing the logic necessary to respond correctly to clicking the No button i.e. to leave the File Sharing setting as it currently is configured.

I've submitted an updated version to TechRepublic and it is now available

by hwmconsulting

I sent a personal message to Greg but thought I should include what I had to say in the discussion as well.

I'm installing CounterSpy Enterprise at a school with about 200 workstations running XP PRO. They all seem to have this SFS active and the only advice to turn it off is to go to each computer and do it manually. The script is interactive and I want it to be automatic.

I've asked if the script can be changed to run from the login script and just switch SFS OFF! No interaction, no Yes/No buttons, just do it!

I looked in the MSKB and found no automation. This script is the only thing I've found that looks like it will work. There doesn't even seem to be a group policy setting.

How about it Greg? Can your script be made to happen automatically? It would be an enormous help.

by Greg Shultz

What you propose should be simple enough as all the script really does is alter a registry value.

Based on my interpretation, this little four-line code snippet should take care of your need. However, you must test and verify it yourself. I can't guarantee that it will work in a logon script.

This code will check the value in the registry to see if Simple File Sharing is turned on. If it is, the script will change the registry value thus turning on Classic File Sharing.

Set WshShell = WScript.CreateObject("WScript.Shell")
FSInterface = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest")
If FSInterface = "1" Then WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", 0, "REG_DWORD"
WScript.Quit

by hwmconsulting

Greg,

Thanks for the script which I copied and pasted into a Notepad .vbs document and called from a test login script as follows (hope the formatting is ok!):

Set WshShell = WScript.CreateObject("WScript.Shell")
FSInterface = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest")
If FSInterface = "1" Then WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", 0, "REG_DWORD"
WScript.Quit

I then logged on as a student and got the following error message:

Script: \\PDC-Datastorage\Netlogon\SFSCheck.vbs
Line: 3
Char: 27
Error: Invalid root in registry key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest"
Code: 80070005
Source: WshShell.RegWrite

The registry entry was not changed.

I must admit that I can't see any error with my limited knowledge of scripting. The error code seems to be an 'access denied' message and checking this registry key shows READ access for normal users.

A startup file runs under the local system account when the computer is restarted but then I will have to force a restart on all computers in the domain.

Do you know of a way to run the script under a specific user account?

by Greg Shultz

When you asked about formatting and then pasted the script back into the post, I think that before we go any further I must ask you to confirm that you understand that this is only a 4 line script. Due to the long commands and word wrap feature in this editor the script code appears to be more lines.

Here is the code again with line numbers demarcating where each line begins. Keep in mind that this is only for illustrative purposes, these line numbers are not part of the script.

1) Set WshShell = WScript.CreateObject ("WScript.Shell")
2) FSInterface = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest")
3) If FSInterface = "1" Then WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", 0, "REG_DWORD"
4) WScript.Quit

by jpete

Bill:
Just set up a wireless net at home, ran the wizards, but cannot get my computers to show in the Home network Workgroup or see any of the shared folders/printers. Just getting the message about user not having permission to access---contact administrator, etc.

Never had a problem with this on my ethernet setup.
What am I missing?

Thanks,

Jon M. Peterson

by vj

I have enable simple file sharing but I have to manually go to Sharing and security and select the link to "Just enable"

Is there anyway I can automate this?

This discussion is closed to new replies.