• 0

Open an explorer.exe folder in HTML


Question

Hi there,

i want to be able to have a link in my HTML page so that when the user clicks it, it will open a folder on the local hard drive - c:\windows for example.

Any javascript onclick function I've tried keeps coming up with the ActiveX warning since SP2. Anyone know how I can do it (even with the activex warning if nothing else works as I haven't been able to get the onclick function to work properly.)

Thanks for your help.

Link to comment
https://www.neowin.net/forum/topic/274030-open-an-explorerexe-folder-in-html/
Share on other sites

19 answers to this question

Recommended Posts

  • 0
  travelcard said:
Hi there,

  i want to be able to have a link in my HTML page so that when the user clicks it, it will open a folder on the local hard drive - c:\windows for example.

  Any javascript onclick function I've tried keeps coming up with the ActiveX warning since SP2. Anyone know how I can do it (even with the activex warning if nothing else works as I haven't been able to get the onclick function to work properly.)

Thanks for your help.

585326995[/snapback]

Why would you want a user to click a link to open up a folder? Sounds kind of shifty to me. :shifty:

  • 0
  Jaded1 said:
Why would you want a user to click a link to open up a folder? Sounds kind of shifty to me.  :shifty:

585327004[/snapback]

I knew someone would say that :D

Just making a menu system for a directory on the server at work.

  • 0
  Tommy2k4 said:
file://c:\windows\ may work

585327010[/snapback]

Well, that kinda gets somewhere when it's written like this:

<html>
<head>
<title>test</test>
</head>
<body>
<a href = "file://c:/windows/"> windows</a>
</body>
</html>

Except the link opens in Internet Explorer not Windows Explorer. Any more ideas?

  • 0
  travelcard said:
Well, that kinda gets somewhere when it's written like this:

<html>
<head>
<title>test</test>
</head>
<body>
<a href = "file://c:/windows/"> windows</a>
</body>
</html>

Except the link opens in Internet Explorer not Windows Explorer.  Any more ideas?

585327493[/snapback]

IE and Windows Explorer are the same thing.

  • 0
  j79zlr said:
IE and Windows Explorer are the same thing.

585333426[/snapback]

Exactly. Go ahead and open up IE right now, and replace what's in the address bar with "file://C:/Windows" and the toolbar changes to the explorer toolbar. That's the way you're going to do it.

EDIT: Do you want to open it in a new window? Try

target="_blank"

That will open it up in a new window that is Explorer (since we showed that IE and Explorer are the same).

Edited by fubarshibby
  • 0
  travelcard said:
No they're not. All the files and folders open up as hyperlinks.

585335856[/snapback]

What are you talking about? As soon as IE open up a folder on the local machine, it changes into Windows Explorer. I would really like a screenshot showing the problem you are having.

I'm confused here, are you trying to display the USER's C:\Windows directory, or the directory on the server? If you are trying to show the directory on the server, then you would need to place it in your webserver's folder, like AresXP said.

  • 0
  travelcard said:
No they're not. All the files and folders open up as hyperlinks.

585335856[/snapback]

Will Ferrel from "Old School": You crazy man... I like you, but you crazy...

Dude, just make a test html page to test on your own computer and put a link to "file://C:/windows" in it. You'll see that j79zlr and I are correct.

  • 0
  M2Ys4U said:
if you're using Firefox, however, it won't work.

585336735[/snapback]

Well, it looks like it's for his work, so hopefully the business has a standardized environment on the desktop, and he won't have to worry about people using anything but IE.

  travelcard said:
Just making a menu system for a directory on the server at work.

585327449[/snapback]

  • 0

Is the folder the same all the time?

this wouldn't exactly be a one click solution, but you could have the user download and open a vbs file that calls Run to invoke explorer.

could you explain the real problem you are trying to solve. If you have access to all of the users computers then you can make use of WSH.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Last chance: Solutions Architect's Handbook, Third Edition (worth $42.99) download by Steven Parker Claim your complimentary eBook worth $42.99 for free, before the offer ends today, June 10. Build a strong foundation in solution architecture and excel in your career with the Solutions Architect’s Handbook. Authored by seasoned AWS technology leaders Saurabh Shrivastav and Neelanjali Srivastav, this book goes beyond traditional certification guides, offering in-depth insights and advanced techniques to meet the specific needs and challenges of solutions architects today. This edition introduces exciting new features that keep you at the forefront of this evolving field. From large language models and generative AI to deep learning innovations, these cutting-edge advancements are shaping the future of technology. Key topics such as cloud-native architecture, data engineering architecture, cloud optimization, mainframe modernization, and building cost-efficient, secure architectures remain essential today. This book covers both emerging and foundational technologies, guiding you through solution architecture design with key principles and providing the knowledge you need to succeed as a Solutions Architect. It also sharpens your soft skills, providing career-accelerating techniques to stay ahead. By the end of this book, you will be able to harness cutting-edge technologies, apply practical insights from real-world scenarios, and enhance your solution architecture skills with the Solutions Architect's Handbook. This free offer expires today, June 10. How to get it Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last! Download Solutions Architect's Handbook, Third Edition (worth $42.99) for free Offered by Packt, view other free resources The below offers are also available for free in exchange for your (work) email: Solutions Architect's Handbook, Third Edition ($42.99 Value) FREE – Expires 6/10 AI and Innovation ($21 Value) FREE – Expires 6/11 Unruly: Fighting Back when Politics, AI, and Law Upend [...] ($18 Value) FREE - Expires 6/17 SQL Essentials For Dummies ($10 Value) FREE – Expires 6/17 Continuous Testing, Quality, Security, and Feedback ($27.99 Value) FREE – Expires 6/18 VideoProc Converter AI v7.5 for FREE (worth $78.90) – Expires 6/18 Macxvideo AI ($39.95 Value) Free for a Limited Time – Expires 6/22 The Ultimate Linux Newbie Guide – Featured Free content Python Notes for Professionals – Featured Free content Learn Linux in 5 Days – Featured Free content Quick Reference Guide for Cybersecurity – Featured Free content We post these because we earn commission on each lead so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin The above deal not doing it for you, but still want to help? Check out the links below. Check out our partner software in the Neowin Store Buy a T-shirt at Neowin's Threadsquad Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: An account at Neowin Deals is required to participate in any deals powered by our affiliate, StackCommerce. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through the branded deals site.
    • Yes. And if anyone has problems, it's because "Windows 11 is buggy..."
    • https://lunduke.locals.com/post/4387539/firefox-money-investigating-the-bizarre-finances-of-mozilla
  • Recent Achievements

    • Week One Done
      IAMFLUXX earned a badge
      Week One Done
    • One Month Later
      Æhund earned a badge
      One Month Later
    • One Month Later
      CoolRaoul earned a badge
      One Month Later
    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      ATLien_0
      268
    3. 3
      +FloatingFatMan
      229
    4. 4
      +Edouard
      199
    5. 5
      snowy owl
      151
  • Tell a friend

    Love Neowin? Tell a friend!