• 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

    • only works for 1 microsoft account . im on rp channel and have 2 pcs with the same microsoft account, i pc got it the other one did not
    • Your first comment about one needing to send all their data to Microsoft's "cloud" to continue Windows 10 support was of course ridiculous but I can't disagree here. I am not sure why the OP would wait to switch to Linux if their Mom just uses a browser as she can use the same one with Linux. Why would she care what OS is running? Install /configure Linux Mint or Ubuntu LTS and almost no maintenance really.
    • Seagate Exos 20 TB BarraCuda 16 TB 7200 RPM CMR hard disk drives are limited-time deals by Sayan Sen Currently, there are some great sales on SSDs, in particular, NVMe M.2 ones, like this SK hynix P41 Platinum P41. However, if you are in the market for a hard disk drive (HDD), then Seagate has you covered. That is because two high-capacity drives, the Exos X20 20TB and the BarraCuda 16 TB are currently at great prices (purchase links down below). Since both of them are high capacity models, they are based on CMR or Conventional Magnetic Recording technology which is typically great for robust use cases like on NAS or (media) home servers and similar such scenarios. However, the Exos is enterprise-grade quality so it is definitely what you would want for 24x7 usage, but the BarraCuda can also serve pretty well but will be a better option for backup purposes. The Exos X20 promises power-on hours of 8760 per year, while the BarraCuda claims 2400. The latter comes with double the DRAM cache, though with 512 MB of it, while the former has 256 MB, but it should still be plenty. In terms of data transfer speed, Seagate promises up to 285 MB/s (272 MiB/s) from the Exos X20 and the BarraCuda is rated for up to 190 MB/s. These are the maximum sustained data transfer rates for the two drives. Since the Exos X20 is an enterprise-class product Seagate does disclose its random performance throughput, which is 168 IOPS for reads and 550 IOPS for writes, respectively. While the BarraCuda's randoms are not specified it is expected to be lower and to compensate, it packs double the DRAM cache. Get the HDDs at the links below: Seagate Exos X20 ST20000NM007D 20TB SATA 6.0Gb/s 3.5" Internal Hard Drive: $379.00 + $50 off with promo code SACET2372 => $329.00 (Newegg US) Seagate BarraCuda ST16000DM001 16TB SATA 6.0Gb/s 3.5" Internal Hard Drive Drive: $194.99 (Newegg US) This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Why do you think the writing is on the wall? Tesla continues to have the highest selling models on the planet, and they continue to grow on that despite their junk reliability rating. I'm not going to buy one because of the continued build quality issues (and lack of Carplay), but I appreciate that they're the best player in an EV market that is massively lacking in infrastructure and affordability. Besides the EV technology needing to eventually outpace gasoline, self-driving technology is undoubtedly going to be the future. It's not going to happen tomorrow and not even in 10 years, but within our lifetimes, most cars on the road will be self-driving. That's the only way to solve the issue of a million deaths on the road. Waymo is using technology that's simply too expensive, which means it has to charge high fares. Tesla is going to blow past them with their ~$40k car and further yet when they release that weird looking 2-seater. Pretty soon Nvidia is going to be a market player, Amazon will be a player, and possibly the other 20+ startups that are working on a vehicle. I'd like to revisit this in a year and see how the market looks. I'm willing to bet there will be a huge increase of driverless cars on the road, and I doubt that Waymo is going to be the majority of them. Waymo isn't profitable for Google, so it's entirely possible the plug gets pulled as soon as several players leave them in the dust.
    • I have always found it funny how so many here complain everyday about Windows but often are the same people who will attack anyone who even suggests using Linux.
  • Recent Achievements

    • Week One Done
      DrRonSr earned a badge
      Week One Done
    • Week One Done
      Sharon dixon earned a badge
      Week One Done
    • Dedicated
      Parallax Abstraction earned a badge
      Dedicated
    • First Post
      956400 earned a badge
      First Post
    • Week One Done
      davidfegan earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      615
    2. 2
      ATLien_0
      229
    3. 3
      Michael Scrip
      167
    4. 4
      +FloatingFatMan
      157
    5. 5
      Xenon
      142
  • Tell a friend

    Love Neowin? Tell a friend!