Jump to content

Recommended Posts

Posted

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.

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
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...