Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Thanked 0 Times in 0 Posts

    Question Open file on viewer computer with HTML

    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?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,053 Times in 1,026 Posts
    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.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts