Launching a shortcut from HTML?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Homercidal

Licensed Sensual Massage Therapist.
HBT Supporter
Joined
Feb 10, 2008
Messages
33,269
Reaction score
5,708
Location
Reed City, MI
I want to make it easy for people using a certain computer to open shortcuts to various locations without them having to browse to them. I thought that HTML might allow me to create links that they could click on to launch each one would be the easiest, but I cannot seem to find a quick guide to making such a link.

I know we have some very computer-savvy people on this forum so I'm asking.
 
Your initial explanation is kind of vague. Do you want people to be able to click on icons on their desktop, and open the browser to certain websites? Do you want people to have a webpage and be able to click on links that open certain files on the computer? Or, just a webpage with links to other websites?
 
Why not just use your browsers bookmarks/favorites? I use a very simple html page with my favorites as well as my bookmarks.
The below is my html code.
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>NAME OF PAGE</title>
<style>
BODY {

scrollbar-3dlight-color:000000;
scrollbar-shadow-color:FFFFFF;
scrollbar-face-color:#5E6876;
scrollbar-darkshadow-color:FFFFFF;
scrollbar-track-color:FFFFFF;
scrollbar-arrow-color:FFFFFF;
scrollbar-highlight-color:FFFFFF;

}



</style>
<STYLE>

.nav {
COLOR: #FFFFFF; TEXT-DECORATION: none
}
A.nav:hover {
COLOR: #FF0000; TEXT-DECORATION: underline
}
</STYLE>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" bgcolor="#5E6876">
<!-- Time and Date -->
<script>

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<small><font color='FFFFFF' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")

</script>

<br>
<!-- End Time and Date -->

<body background color = "#5E6876">
<br><br><br><br>
<center>
<!-- Begin Yahoo Search Form -->
<FORM METHOD="GET" ACTION="http://search.yahoo.com/bin/search">
<a href = "http://WWW.YAHOO.COM" class = "nav"><font size = "6" face = "Yahoo!&copy">YAHOO!</font></a><br>

<INPUT SIZE="20" NAME="p">
<INPUT TYPE="SUBMIT" VALUE="Search">



</FORM>
<!-- End Yahoo Search Form -->


<a href = "http://ADD.LINK" class = "nav"><font face="Arial" size="2"><b>ADD TITLE</b></font></a>
<br>


</center>
</body>
</html>
 
If you're talking about opening locations on your network it's as easy as right-clicking on the folder and selecting Send To -> Desktop(create shortcut). If it's a valid network location for EVERYONE then you can just send/copy it to different computer. If you want to do this on a web page, check out this link:

What are the ways to make an html link open a folder - Stack Overflow

* Internet Explorer will work if the link is a converted UNC path (file://server/share/folder/).
* Firefox will work if the link is in its own mangled form using five slashes (file://///server/share/folder) and the user has disabled the security restriction on file: links in a page served over HTTP. Thankfully IE also accepts the mangled link form.
* Opera, Safari and Chrome can not be convinced to open a file: link in a page served over HTTP.

Here's some sample code for links pointed to a network location:
Code:
<html>
<body>

<a href = "file://fileserver/BusinessFiles/MarketingDocs">Link to Marketing Docs for IE</a>
<br>
<a href = "file://///fileserver/storage">Link to Marketing Docs for Firefox</a>

</body>
</html>
 
Ok, what I want to do is make an HTML page with a list of links that will launch a file. The files will be on a mapped network drive.

This way they can have a single page with all part numbers listed, and when they click on the link, the program starts and opens that part number.

After reading the manual, I may have to launch a shortcut with a switch, as simply trying to launch the part file on it's own doesn't work.

The path with shortcut would be like:

C:\Program.exe /Layout=G:\SPC\partnumber.La2

I associated the partnumber file type to that program, yet it will not open correctly. Sopposedly you have to launch as shown above.
 
If you're talking about opening locations on your network it's as easy as right-clicking on the folder and selecting Send To -> Desktop(create shortcut). If it's a valid network location for EVERYONE then you can just send/copy it to different computer. If you want to do this on a web page, check out this link:

What are the ways to make an html link open a folder - Stack Overflow



Here's some sample code for links pointed to a network location:
Code:
<html>
<body>

<a href = "file://fileserver/BusinessFiles/MarketingDocs">Link to Marketing Docs for IE</a>
<br>
<a href = "file://///fileserver/storage">Link to Marketing Docs for Firefox</a>

</body>
</html>

Oops, I think that last one is what I want. Sorry, I got sidetracked on another problem and just got back and skimmed too quickly!
 
That was close, but it's actually a local drive the file is on. It has to point to a local shortcut, which will open the file on a network. The path to the network is in the shortcut. Sorry.
 
not a problem, just change the path in the link. Instead of file://///fileserver/..., just use file:///c:/program files/some_file_name.txt

Clear as mud?
 
Yeah, I got it to work, sort of. Except FF wanted to open it as text, and IE finally opened it, but opened it in a weird location and the program wont' run unless it's opened from the right directory. I just gave up on it. I was spending way too much time than I needed to.

I just ended up creating folder with a bunch of shortcuts that they can click on. That's easy enough I think. The web page would have looked nicer.
 

Latest posts

Back
Top