• 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

    • I only had time to watch a few minutes of the keynote, but I get the impression that there isn't going to be that much to excite me with iOS/iPadOS/watchOS 26. Unifying aspects of all of the OSes I think in general has merit, but I do think Liquid Glass is largely nonsense and just fluff. I hope sheeple people don't drool over something as Liquid Glass. Some of this just seems to be shuffling the deck chairs of the Titanic botch job of Apple Intelligence and how largely useless Siri has been for 10 years. It ticks me off more than anything. Liquid Glass is just a retread from previous macOS and Windows releases (as everyone has stated). Improve things you already released (including Shortcuts and Automations) instead of giving me fluff.
    • I’m kind of wonder about said crowed as well…
    • Oh I didn't forget. This just show all around they are out of ideas now. Old UI is old UI. Having said that, I want the classic Windows theme back as an option in Win11. And I still say they copied Vista here. That doesn't look as much like Aqua to me.
    • Windows XP had a fantastic start menu, that for someone like me who doesn't like to spend a lot of times customizing things, worked fantastically!! I actually liked the Windows 7 menu a little better, the right-column of options was a little more useful, and it has a more appropriate number of frequently used apps (on XP you could increase this, which I always did). I never liked the 8/8.1 start screen at all, although I did like the concept of widgets. Windows 10's start menu seems like a great way to blend the good things about the Windows 7 menu with widgets, which I thought seemed promising. However, with widgets never becoming popular, it left the Windows 10 start menu looking like an ugly mess. I am not a huge fan of the Windows 11 start menu, but it looks clean and doesn't get in my way.
    • I think a lot of this is preemptive on the potential losing Google default search money which can hurt them.
  • 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
      492
    2. 2
      ATLien_0
      268
    3. 3
      +FloatingFatMan
      233
    4. 4
      +Edouard
      199
    5. 5
      snowy owl
      154
  • Tell a friend

    Love Neowin? Tell a friend!