2、双击运行编辑的bat文件即可设置成功。
3、运行前的IE设置。
4、运行后的IE设置。
::::::::::::::::::::::::::::::批处理提示完成等信息的方法::::::::::::::::::::::::::::::::::::: echo intAnswer=Msgbox("1.***" ^&vbNewLine ^&"" ^&vbNewLine ^&"2.***", ok, "提示:")>"%TEMP%\inform.vbs"
:: attrib +H "%TEMP%\inform.vbs"
:: "%TEMP%\inform.vbs"
:: del /a /f "%TEMP%\inform.vbs"
::::::::::::::::::::::::::::::::::创建快捷方式的方法:::::::::::::::::::::::::::::::::::::::
:: sPath代表批处理所运行的位置,待创快捷方式程序与批处理在同目录,否则要修改sPath后的路径::
:: 如用%sPath%文件夹名称\,若用Programs替换Desktop ,则在“开始--所有程序”中创建快捷方式::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: set sPath=%~dp0
:: echo On Error Resume Next>"%TEMP%\createcs.vbs"
:: echo attrib +H "%TEMP%\createcs.vbs"
:: echo Set Shell=CreateObject("WScript.Shell")>>"%TEMP%\createcs.vbs"
:: echo CsPath=Shell.SpecialFolders("Desktop")>>"%TEMP%\createcs.vbs"
:: echo Set link=Shell.CreateShortcut(CsPath ^&"\\程序名称.lnk")>>"%TEMP%\createcs.vbs"
:: echo link.description="位置:"^&"%sPath%">>"%TEMP%\createcs.vbs"
:: echo link.TargetPath="%sPath%程序名称.exe">>"%TEMP%\createcs.vbs"
:: echo link.WindowStyle=1 >>"%TEMP%\createcs.vbs"
:: echo link.WorkingDirectory=CsPath>>"%TEMP%\createcs.vbs"
:: echo link.Save>>"%TEMP%\createcs.vbs"
:: echo Set link2=Shell.CreateShortcut(CsPath ^&"\\程序名称2.lnk")>>"%TEMP%\createcs.vbs"
:: echo link2.description="位置:"^&"%sPath%">>"%TEMP%\createcs.vbs"
:: echo link2.TargetPath="%sPath%程序名称2.exe">>"%TEMP%\createcs.vbs"
:: echo link2.WindowStyle=1 >>"%TEMP%\createcs.vbs"
:: echo link2.WorkingDirectory=CsPath>>"%TEMP%\createcs.vbs"
:: echo link2.Save>>"%TEMP%\createcs.vbs"
:: "%TEMP%\createcs.vbs"
:: del /a /f "%TEMP%\createcs.vbs"
:::::::::::::::::::::::::注册批处理所在目录及其所有子目录下DLL的方法::::::::::::::::::::::
:: if exist "%SystemDrive%\RegKJ.tmp" del /q "%SystemDrive%\RegKJ.tmp"
:: dir /s /b "*.dll">>"%SystemDrive%\RegKJ.tmp"
:: dir /s /b "*.ocx">>"%SystemDrive%\RegKJ.tmp"
:: for /f "delims=*" %%i in (%SystemDrive%\RegKJ.tmp) do Regsvr32 /s "%%i"
:: del /q "%SystemDrive%\RegKJ.tmp"
::::::::::::::::::::::::::用批处理安装字体的方法-.\指批处理所在目录:::::::::::::::::::::::
:: REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL" /V "CheckedValue" /T "REG_DWORD" /D "1" /F>NUL
:: IF NOT EXIST "%SystemRoot%\FONTS\DESKTOP.INI" ECHO [.ShellClassInfo]>"%SystemRoot%\FONTS\DESKTOP.INI" &&ECHO UICLSID={BD84B380-8CA2-1069-AB1D-08000948F534}>>"%SystemRoot%\FONTS\DESKTOP.INI"
:: ATTRIB +H +R "%SystemRoot%\FONTS\DESKTOP.INI"
:: ATTRIB +H +R "%SystemRoot%\FONTS"
:: copy /Y .\字体所在目录名称\*.ttf "%SystemRoot%\fonts\"
:: start explorer "%SystemRoot%\fonts\"
:: echo set WshShell=createobject("wscript.shell")>"%temp%\$tep$.vbs"
:: echo{作者,束继涛,转载请保留原注释!!HTTP:\\www.vifachina.com,作者QQ 32240972}
:: attrib +H "%temp%\$tep$.vbs"
:: echo WshShell.AppActivate "FONTS">>"%temp%\$tep$.vbs"
:: echo WshShell.sendkeys "%%{f4}">>"%temp%\$tep$.vbs"
:: "%temp%\$tep$.vbs"
:: del /a /f "%temp%\$tep$.vbs"
:::::::::::::::::::::::::::::::::::开始执行代码::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::路径解析::::::::::::::::::::::::::::::::::::::
set CurPath=%~dp0
set CurPath=%CurPath:~0,-1%
set CurPath=%CurPath:\=\\%
set ALLUSERSPROFILE=%ALLUSERSPROFILE:\=\\%
set APPDATA=%APPDATA:\=\\%
set CommonProgramFiles=%CommonProgramFiles:\=\\%
set ProgramFiles=%ProgramFiles:\=\\%
set SystemRoot=%SystemRoot:\=\\%
set windir=%windir:\=\\%
set ComSpec=%ComSpec:\=\\%
set Path=%Path:\=\\%
set HOMEPATH=%HOMEPATH:\=\\%
set USERPROFILE=%USERPROFILE:\=\\%
::::::::::::::::::::::::在以下部分中需用%CurPath%替换批处理运行的路径::::::::::::::
::::::::::::::::::::::::::::::::::在以下部分中需用%%1替换%1::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::导入注册表::::::::::::::::::::::::::::::::::
if exist "%TEMP%\ie_安装.reg" del /q "%TEMP%\ie_安装.reg"
echo Windows Registry Editor Version 5.00>>"%TEMP%\ie_安装.reg"
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-100000000001}]>>"%TEMP%\ie_安装.reg"
echo @="Internet Explorer">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}]>>"%TEMP%\ie_安装.reg"
echo @="Internet Explorer">>"%TEMP%\ie_安装.reg"
echo "InfoTip"="@C:\\Windows\\System32\\ieframe.dll,-881">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\DefaultIcon]>>"%TEMP%\ie_安装.reg"
echo @="C:\\Windows\\System32\\ieframe.dll,-190">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell]>>"%TEMP%\ie_安装.reg"
echo @="">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Clean]>>"%TEMP%\ie_安装.reg"
echo @="删除历史记录(&C)">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Clean\Command]>>"%TEMP%\ie_安装.reg"
echo @="\"C:\\Windows\\System32\\rundll32.exe\" InetCpl.cpl,ClearMyTracksByProcess 255">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\NoAddOns]>>"%TEMP%\ie_安装.reg"
echo @="无加载项启动(&N)">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\NoAddOns\Command]>>"%TEMP%\ie_安装.reg"
echo @="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -extoff">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Open]>>"%TEMP%\ie_安装.reg"
echo @="打开主页(&H)">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Open\Command]>>"%TEMP%\ie_安装.reg"
echo @="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Set]>>"%TEMP%\ie_安装.reg"
echo @="属性(&R)">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\shell\Set\Command]>>"%TEMP%\ie_安装.reg"
echo @="\"C:\\Windows\\System32\\rundll32.exe\" C:\\Windows\\System32\\shell32.dll,Control_RunDLL C:\\Windows\\System32\\inetcpl.cpl">>"%TEMP%\ie_安装.reg"
echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-100000000001}\ShellFolder]>>"%TEMP%\ie_安装.reg"
echo @="C:\\Windows\\System32\\ieframe.dll,-190">>"%TEMP%\ie_安装.reg"
echo "HideAsDeletePerUser"="">>"%TEMP%\ie_安装.reg"
echo "Attributes"=dword:00000000>>"%TEMP%\ie_安装.reg"
echo "HideFolderVerbs"="">>"%TEMP%\ie_安装.reg"
echo "WantsParseDisplayName"="">>"%TEMP%\ie_安装.reg"
echo "HideOnDesktopPerUser"="">>"%TEMP%\ie_安装.reg"
regedit /s "%TEMP%\ie_安装.reg"
del /q "%TEMP%\ie_安装.reg"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)