LevT
 
  
  Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору       mk:@MSITStore:С:\e-Books\MSPress\Windows.XP.Inside.Out-JGT\eBook\WINXPIO_try1.CHM::/HTML/32ch13d.htm       As a general practice, you should be consistent in your use of either the Simple File Sharing interface or the full NTFS permissions. Switching back and forth indiscriminately can wreak havoc with network shares, for instance, as we point out in Chapter 31, "Managing Shared Folders and Printers." If you normally use Simple File Sharing, but occasionally need to work with the full set of permissions, you can bypass the dialog boxes with this simple script, which toggles between the two modes. Open Notepad or any plain text editor and enter the following text:          '' ToggleSharingOptions.vbs      ' Toggles between Simple Sharing and full NTFS permissions      Option Explicit    Dim strOldForceGuestValue, WshShell       On Error Resume Next       Set WshShell = WScript.CreateObject("WScript.Shell")    strOldForceGuestValue = _       WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest")      If strOldForceGuestValue = "1" Then        WshShell.RegWrite _           "HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", 0, "REG_DWORD"        WScript.Echo "Full permissions are now available"    Else        WshShell.RegWrite _           "HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", 1, "REG_DWORD"        WScript.Echo "Simple sharing is now on"    End If      Alternatively you can copy the ToggleSharingOptions.vbs file from the companion CD included with this book.        |