|
给你一个例子:
@echo off
Title=添加删除 我的电脑 中 在这台计算机上存储的文件
:begin
color 02
echo.
echo.
echo 添加删除 我的电脑 中 在这台计算机上存储的文件
echo.
echo Make by CY 版权没有 翻版不究
echo.
echo.
echo =======================================================
echo [1] 要显示 用户文挡
echo [2] 不显示 用户文挡
echo [Q] 我不干 退出好了
echo =======================================================
echo.
echo 注意:必要时需要 注销 一下才有效果!
echo.
echo 请选择要进行的操作(1/2/Q),然后按回车:
SET Choice=
echo.
SET /P Choice=
IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
IF /I '%Choice%'=='1' GOTO add
IF /I '%Choice%'=='2' GOTO del
IF /I '%Choice%'=='Q' GOTO end
GOTO begin
:del
echo REGEDIT4>Shared.reg
echo.>>Shared.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]>>Shared.reg
echo.>>Shared.reg
echo "NoSharedDocuments"=hex:01,00,00,00>>Shared.reg
echo.>>Shared.reg
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]>>Shared.reg
echo @="">>Shared.reg
echo.>>Shared.reg
GOTO reg
:add
echo REGEDIT4>Shared.reg
echo.>>Shared.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]>>Shared.reg
echo.>>Shared.reg
echo "NoSharedDocuments"=hex:00,00,00,00>>Shared.reg
echo.>>Shared.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]>>Shared.reg
echo @="">>Shared.reg
echo.>>Shared.reg
:reg
regedit /s Shared.reg & del Shared.reg
:end
exit
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSharedDocuments"=hex:01,00,00,00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]
@=""
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSharedDocuments"=hex:00,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]
@=""
|
|