DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> 關於JavaScript >> 使用Javascript創建快捷方式
使用Javascript創建快捷方式
編輯:關於JavaScript     

需將站點設為信任站點。

             var fso = new ActiveXObject("Scripting.FileSystemObject");  
             var shell = new ActiveXObject("WScript.Shell");     
             var tagFolder = "c:\\Temp";
              
                if(!fso.FolderExists(tagFolder ))
                 {
                      fso.CreateFolder(tagFolder);
                     //alert("Create success!");
                 }
                 if(!fso.FileExists(tagFolder + "\\eip.lnk"))
                 {               
                     var link = shell.CreateShortcut(tagFolder + "\\eip.lnk"); 
                     link.Description = "打開一個程序的快捷方式";          
                     link.TargetPath = "http://www.163.com";
                     link.WindowStyle = 3;
                     link.WorkingDirectory = "c:\\blah";           
                     link.Save();                     
                 }            
http://www.cnblogs.com/xiaoko/archive/2006/09/05/495626.html

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved