View Full Version : Open file on viewer computer with HTML

05-20-2012, 07:27 PM
Opening a file on the users C:\ drive with HTML. (Windows only, of course.)

I can have a viewer open a specific text file on his or her computer using the absolute path; i.e.

<a href="file:////C:/Users/JohnDoe/AppData/Roaming/ICAClient/webica.ini">webica.ini</a>

Unfortunately, for a wide variety of users I need something like an environmental variable, in this case


If a user pastes this into a Windows Explorer window it works perfectly. However this DOES NOT WORK.

<a href="file:////%AppData%/ICAClient/webica.ini">webica.ini</a>

Any suggestions on a variation which will work?

05-20-2012, 10:30 PM
So, I understand that the file is already existing on the user’s computer (assumed they have Windows OS) and you want to open this by clicking on a link in the browser? I think this is only possible with some kind of ActiveX control using Internet Explorer. But I have no idea how this is done. Definitely not with HTML alone. Websites aren’t supposed to be able to access the users’ system as many bad things could be done with that.