China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 06:14
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to close the "Use Simple File Sharing" in XP in the form of bat, vbs, reg, etc. View 1,822 Replies 9
Original Poster Posted 2009-07-27 08:27 ·  中国 辽宁 抚顺 联通
新手上路
Credits 12
Posts 12
Joined 2009-06-27 12:07
17-year member
UID 148241
Gender Male
Status Offline
RT
Don't tell me to use manual intervention.
It should be a problem of modifying the registry. I don't know how to change it. I'm not very familiar with the registry. I hope for guidance.
Thanks.
Floor 2 Posted 2009-07-27 09:32 ·  中国 上海 杨浦区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
:: Disable Simple Sharing
%SystemRoot%\System32\REG add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing" /f /v "DefaultValue" /t REG_DWORD /d 0
Floor 3 Posted 2009-07-27 09:49 ·  中国 辽宁 抚顺 联通
新手上路
Credits 12
Posts 12
Joined 2009-06-27 12:07
17-year member
UID 148241
Gender Male
Status Offline
Upstairs, no good, didn't change it back.

What I want is to turn off the "Use simple file sharing" option in the folder options of XP.
Floor 4 Posted 2009-07-27 10:30 ·  中国 辽宁 抚顺 联通
新手上路
Credits 12
Posts 12
Joined 2009-06-27 12:07
17-year member
UID 148241
Gender Male
Status Offline
%SystemRoot%\System32\REG add
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing" /f /v
"DefaultValue" /t REG_DWORD /d 0
Floor 5 Posted 2009-07-27 10:30 ·  中国 辽宁 抚顺 联通
新手上路
Credits 12
Posts 12
Joined 2009-06-27 12:07
17-year member
UID 148241
Gender Male
Status Offline
%SystemRoot%\System32\REG add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing" /f /v "DefaultValue" /t REG_DWORD /d 0
Still no good like this
Floor 6 Posted 2009-07-28 02:02 ·  中国 上海 普陀区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
It should be okay. If it really doesn't work, you can directly run regedit to find the corresponding item and modify it.

When using psexec, you need to unhook the simple file sharing, so this modification must be okay.

If it really doesn't work, you can use regshot to monitor the registry modification process.
Floor 7 Posted 2009-07-28 10:20 ·  中国 陕西 安康 电信
初级用户
Credits 58
Posts 29
Joined 2008-08-15 19:21
17-year member
UID 123291
Gender Male
Status Offline
The results of manually checking or unchecking in "Folder Options" monitored by Regshot are:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest: 0x00000000
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest: 0x00000001
Floor 8 Posted 2009-07-28 10:23 ·  中国 广东 广州 花都区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Find the place, after modifying the registry, you need to refresh. Usually, restarting solves it
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 9 Posted 2009-07-28 12:15 ·  中国 上海 杨浦区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
Hei, the part you monitored is about forcing the use of the guest user for access under XP. The following settings first disable simple sharing, then set to log in in local user mode, and then refresh. It can meet all the environment setting requirements of psexec.

:: Disable Simple Sharing
%SystemRoot%\System32\REG add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing" /f /v "DefaultValue" /t REG_DWORD /d 0
:: Configure netshare
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "restrictanonymous" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "restrictanonymoussam" /t REG_DWORD /d 1
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "forceguest" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "limitblankpassworduse" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" /f /v "autoshareserver" /t REG_DWORD /d 1
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /f /v "AutoShareWks" /t REG_DWORD /d 1
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
Floor 10 Posted 2009-07-29 09:24 ·  中国 福建 福州 连江县 电信
中级用户
★★
Credits 356
Posts 115
Joined 2004-07-27 00:00
22-year member
UID 29114
Gender Male
Status Offline
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing]
"Type"="checkbox"
"Text"="@shell32.dll,-30518"
"HKeyRoot"=dword:80000002
"RegPath"="System\\CurrentControlSet\\Control\\LSA"
"ValueName"="ForceGuest"
"CheckedValue"=dword:00000001
"UncheckedValue"=dword:00000000
"HelpID"="shell.hlp#51154"
"DefaultValue"=dword:00000001
--------------------------------------------------------------------------
The above is exported from XPSP3.
It should be modifying HKLM\SYSTEM\CurrentControlSet\Control\Lsa\forceguest, and it worked.
I understand that DefaultValue is the default value specified when clicking "Restore to default value".
Forum Jump: