2

I need to create a short cut to internet explorer - iexplore.exe - passing it a URL. This is for an internal product that will only function in IE.

Normally I could just specify the "c:\program files\internet explorer\iexplore.exe" http://my.intranet.site

However, we are a mixed environment - Windows XP 32-Bit and Windows 7 32/64 Bit. The internal product only works with the 32 Bit versions of IE and we have alternative browsers installed on our PCs so simply giving the end users the URL on their desktop won't work either if they've changed their default browser.

Since iexplore.exe is part of the path, I have determined that from a command prompt I can simply type iexplore.exe http://my.intranet.site and it opens in all flavors of windows that we use without issue. But I can't create a short cut because the iexplore.exe doesn't have a path.

I found a vbscript and a powershell script that create LNK files, however they both append a C:\ at the front.

Any ideas?

Roger Pray
  • 51
  • 4
  • 2
    Windows shortcuts are always absolute. There is no way to make a shortcut with a relative path. – Dark Falcon Sep 10 '13 at 14:51
  • why not just launch the page from your internal program, which will use the default browser... is it really critical it use ie? – SnakeDoc Sep 10 '13 at 14:53
  • It will ONLY work with IE, there are local components that must be installed on each device for the application to even function properly. And it is a critical application within our environment, at least this is better than the old version which was all telnet based. I guess I'll go old school and create a CMD file to call iexplore.exe using relative pathing and compile that to an EXE. Thanks for the effort! – Roger Pray Sep 10 '13 at 17:38
  • Why not use an environment variable? e.g. `%ProgramFiles%` – EricLaw Sep 10 '13 at 21:39
  • EricLaw - unfortunately in the Win 7 64Bit Environment %programfiles% will call the 64 Bit version of IE which is what I was trying to avoid. However, creating the batch file and simply doing the "start iexplore.exe " did work quite nicely and my end users are none the wiser. – Roger Pray Oct 07 '13 at 17:35

1 Answers1

1

In the end I created a .BAT file and turned it into an EXE.

The command line reads: start iexplore.exe [url]

Many of the other suggestions were helpful, but all seemed to wind up calling the 64Bit version on Win7 or a non-existent path on 32 Bit XP.

Thanks again.

Roger Pray
  • 51
  • 4