Sign in to follow this  
Followers 0
Xander

Creating shortcut to always open in IE

3 posts in this topic

I want to create a few shortcuts that will, due to ActiveX needs, always open in IE. I've tried several variations and none of them work.

FileCreateShortcut('"' & @ProgramFilesDir & "\intern~1\iexplore.exe" & '" [url="http://www.kaspersky.com/virusscanner%27,@DesktopCommonDir"]http://www.kaspersky.com/virusscanner',@DesktopCommonDir[/url] & "\Kaspersky Online Virus Scanner.lnk")
The above gives me: "C:\"C:\Program Files\Internet Explorer" http://www.kaspersky.com/virusscanner" (including the quotes)

I was hoping that dropping the IE path down to the 8.3 would do it but nuh-uh. That didn't work either.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Broke it down for easier reading.

$scexe = @ProgramFilesDir & "\intern~1\iexplore.exe"

$scarg = "http://www.kaspersky.com/virusscanner"

$scdest = @DesktopDir & "\ShortcutName.lnk"

FileCreateShortcut( $scexe, $scdest, "", $scarg)

Note that the url belongs as the "args" option (as referenced in the help file).

Edited by xcal

Share this post


Link to post
Share on other sites

Thanks. I'm kickin' myself. One of those things that I *used* to know but, doing less scripting lately and focusing on that which has been more of a challenge, I've forgotten the more obvious stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0