本帖最后由 5209520 于 2022-12-14 10:49 编辑
- @echo off
- if exist C:\1.txt (
- taskkill /f /im iexplo*
- ECHO ---正在解除权限.........
- set route=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData
- :fix
- del %tmp%\ko.txt/q
- echo "%route%"[7]>>%tmp%\ko.txt
- regini %tmp%\ko.txt
- ping 127.1 -n 3
- set route=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2
- :fix
- del %tmp%\ko.txt/q
- echo "%route%"[7]>>%tmp%\ko.txt
- regini %tmp%\ko.txt
- ping 127.1 -n 3
- ECHO ---删除信任
- Reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges" /f
- ping 127.1 -n 2
- ECHO 开始配置智联T9运行环境……
- REM ECHO 该设置不会对您的电脑使用带来影响
- REM ---增加信任站点
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range302" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range302" /v ":Range" /t REG_SZ /d "*.9csoft.com" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range302" /v "http" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range303" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range303" /v ":Range" /t REG_SZ /d "*.zlt9.com" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range303" /v "http" /t REG_DWORD /d 2 /f > nul
-
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range304" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range304" /v ":Range" /t REG_SZ /d "*.zlt9.cn" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range304" /v "http" /t REG_DWORD /d 2 /f > nul
-
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range301" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range301" /v ":Range" /t REG_SZ /d "61.128.196.*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range301" /v "http" /t REG_DWORD /d 2 /f > nul
-
- REM ---设置IE信任区域
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "DisplayName" /t REG_SZ /d "可信站点" /f > nul
- ECHO ---正在设置权限.........
- set route=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData
- :fix
- del %tmp%\ko.txt/q
- echo "%route%"[8]>>%tmp%\ko.txt
- regini %tmp%\ko.txt
- ping 127.1 -n 3
- set route=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2
- :fix
- del %tmp%\ko.txt/q
- echo "%route%"[8]>>%tmp%\ko.txt
- regini %tmp%\ko.txt
- ) else (echo >nul 2>nul)
- ping 127.1 -n 2
- set dir=C:\WINDOWS\Temp
- rd /s /q "%dir%"
- exit
- ) else (
- goto :i
- )
- goto :eof
-
- :i
- echo 不存在文件
复制代码 上面是在论坛搜索 自己的做的 主要目的是实现 平 判断文件是否存在并运行命令 实现注册表设置访问权限 在设置注册表相干设置 如果不存在文件 就自动退出 现在能做出判断 并且运行命令 可是开头 if exist C:\1.txt 这个命令运行后 批处理设置注册表不能实现 如果去掉if exist C:\1.txt 这个命令后 就能设置注册表权限 麻烦论坛里高手帮忙看看 谢谢 |