windows批处理修改IE主页

@echo off
 
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
 
if '%errorlevel%' NEQ '0' (
 
echo 请求管理员权限...
 
goto UACPrompt
 
) else ( goto gotAdmin )
 
:UACPrompt
 
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
 
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
 
"%temp%\getadmin.vbs"
 
exit /B
 
:gotAdmin


reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t reg_sz /d "www.dten.com" /f
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main" /v "Default_Page_URL" /t reg_sz /d "www.dten.com" /f
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main" /v "First Home Page" /t reg_sz /d "www.dten.com" /f


pause
 

你可能感兴趣的:(其他,修改IE主页)