• 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

    • Good bit of updates, if they keep this up until the new hardware lands we could be in for some good surprises.
    • Scientists explain how bigger does not mean better for electric vehicles during colds by Sayan Sen Image by Blomst via Pixabay A new study by Cornell University researchers, working with Tompkins Consolidated Area Transit (TCAT), has found that electric buses use a lot more energy in cold weather, especially in places like Ithaca, where the roads are hilly and winters can be harsh. TCAT started testing seven battery-electric buses (BEBs) in 2021 as part of a pilot program funded by a federal grant. Over two years, the buses ran on 41 different routes in Tompkins County.However,t the buses had issues during colder months, with lower driving range and performance. To understand why, researchers looked at real-world data and developed what they called “Optimal Temperature Zone” (OTZ) models—these models show how much energy the buses would have used in ideal temperatures between 16°C and 30°C. When temperatures dropped to between −4°C and 0°C, the buses used about 48.0% more energy, including both power used to drive and energy regenerated through braking, compared to OTZ predictions. Even in the wider range of −12°C to 10°C, energy use still jumped by 28.6%. Half of this extra energy went into heating the batteries themselves. These bus batteries work best at about 24°C, so when it’s cold, they need extra power to warm up before the bus can even get moving. The other major factor was the cabin’s heating system, especially on urban routes where doors open and close often, letting in cold air. “With an all-electric vehicle, the battery is the only onboard energy source,” said Max Zhang, senior author of the study and a professor at Cornell. “Everything has to come from it.” The study also found that regenerative braking—the process that lets the battery recharge a bit while the bus slows down—didn’t work as well in cold conditions. One reason is that these bus batteries are huge, about eight times bigger than typical electric car batteries, and it’s harder to keep the temperature even across all the battery cells. To improve the buses' performance in winter, the researchers suggested a few short-term fixes: parking them indoors to keep them warmer, charging batteries while they’re still warm, and reducing the length of time the doors stay open during stops. On a bigger scale, cities might need to rethink their transit infrastructure. That includes checking how many charging stations they have, whether buses can be kept in heated garages, and how to adjust routes and schedules. “You have to try to optimize the schedule of all of the buses and to consider the capability of your infrastructure – how many charging stations you have, and if you have your own garage,” said lead author and PhD student Jintao Gu. The team found that rural routes, which have fewer stops, use less extra energy in cold weather than urban ones. That could help transit agencies decide which routes are better for electric buses during colder months. “One of the lessons we’ve learned is that these buses should be designed for the whole country, including states with colder climates,” said Zhang. “But any lessons are good lessons. This helps us learn as a society and do better.” Source: Cornell University, ScienceDirect This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act of 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing
    • Appears to be 150W PSU (Core Ultra 9) so most power delivery ports wouldn't even support it.
  • Recent Achievements

    • Dedicated
      tesla maxwell earned a badge
      Dedicated
    • Dedicated
      Camlann earned a badge
      Dedicated
    • Week One Done
      fredss earned a badge
      Week One Done
    • Dedicated
      fabioc earned a badge
      Dedicated
    • Week One Done
      GoForma earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      636
    2. 2
      Michael Scrip
      224
    3. 3
      ATLien_0
      219
    4. 4
      +FloatingFatMan
      142
    5. 5
      Xenon
      136
  • Tell a friend

    Love Neowin? Tell a friend!