js创建桌面快捷 开始菜单

    在windows下,用js创建桌面超链接和程序开始菜单

var Shell   =   new   ActiveXObject("WScript.Shell");
ProgramsPath   =   Shell.SpecialFolders("Programs");
fso   =   new   ActiveXObject("Scripting.FileSystemObject");
if   (!fso.folderExists(ProgramsPath   +   \\floderName))
	fso.CreateFolder(ProgramsPath   +   "\\floderName");
link   =   Shell.CreateShortcut(ProgramsPath   +   "\\floderName\\fileName.lnk");
link.Arguments   =   "";
link.Description   =   "作者:author";
link.HotKey   =   "";
link.IconLocation   =   "D:\\client\\eb.ico,0";
link.TargetPath   =   "D:\\client\\start.bat";
link.WindowStyle   =   1;
link.WorkingDirectory   =   "D:\\client";
link.Save();
DesktopPath   =   Shell.SpecialFolders("Desktop");
link   =   Shell.CreateShortcut(DesktopPath   +   "\\易建工程项目管理系统.lnk");
link.Arguments   =   "";
link.Description   =   "作者:author";
link.HotKey   =   "";
link.IconLocation   =   "D:\\client\\eb.ico,0";
link.TargetPath   =   "D:\\client\\start.bat";
link.WindowStyle   =   1;
link.WorkingDirectory   =   "D:\\client";
link.Save();


 

你可能感兴趣的:(windows,shell,项目管理)