Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create desktop shortcut

807600Oct 11 2007 — edited Oct 11 2007
Dear Friends,
I have to create desktop a shortcut for some resons for all clients pc's and it works perfectlly without any problem, but I found that I must enable ActiveX for IE ( Tools->Internet Options->Security->Internet->Custom ).and I don't have a domain to do it from one place so could any one tell me how to create a shortcut without checking ActiveX . I need it very well.
I used this code .
//////////////////////////////
function shortcut()
{

var WshShell = new ActiveXObject("WScript.Shell");
strDesktop = WshShell.SpecialFolders("Desktop");
var oShellLink = WshShell.CreateShortcut(strDesktop + "\\out.url");
oShellLink.TargetPath = "%%OUT%%" ;
oShellLink.Save();
}
/////////////////////////////
Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2007
Added on Oct 11 2007
2 comments
137 views