Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create desktop shortcut

Status
Not open for further replies.
Sep 29, 2007
15
0
0
JO
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,
 
so could any one tell me how to create a shortcut without checking ActiveX

Or better yet, a way to put a pornographic image on their desktop. Or better yet, how about a way to put 99999 icons on their desktop? Or better yet, how about a way to install a virus on their pc? [smile] [thumbsup2] [smile] [thumbsup2] [smile] [thumbsup2] [smile]

Seriously, the ActiveX warnings exist for a reason. Your motives may be pure, but that doesn't mean you should get unhindered access to the user's pc. If this was the case, the deviants that would do the things I listed above would able to freely do so.

You're just going to have to face the facts - if you want to change any settings on a user's computer you'll have to use ActiveX - which means that you're going to have to get the user's permission first, and rightly so.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
You have no reason to put the function in a html page. Put those script (5) lines in a text file and save it with an extension .js. Set the script file as a login script or let the user double-click on it. If it is on a local network, you have all the arsenal of administrative scripting technology at your disposal.
 
don't have a domain to do it from one place
does this mean you can't fire logon scripts for users? and no-one is on a network.

Are these standalone PC's with nothing but an internet connection?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top