• 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

    • Wow. The Verge live blogging it with paywall turned ON and as well as deleting my opinion about that aero style glassy design. 😵‍💫
    • Yeah it is like Aero Glass reborn! (which I loved) but I do not have any Apple devices.
    • Amazon to invest $20 billion in Pennsylvania for AI infrastructure, creating 1,250 jobs by Paul Hill The governor of Pennsylvania, Josh Shapiro, has announced that Amazon has agreed to invest at least $20 billion in AI infrastructure in the state. Shapiro noted that this is the largest-ever private sector investment in the state’s history and is set to create at least 1,250 high-paying, high-tech jobs, plus thousands of construction jobs to build the AWS data centers. The initial locations for the first two data centers are Salem Township in Luzerne County and Falls Township in Bucks County. The governor said that more sites were also under consideration, so this $20 billion figure could grow further. Aside from the obvious benefits for the locals, it also helps to keep America in a strong position in its AI race with China. Why Pennsylvania? The Shapiro administration's role “Pennsylvania is competing again – and I’m proud to announce that with Amazon’s commitment of at least $20 billion to build new state-of-the-art data center campuses across our Commonwealth, we have secured the largest private sector investment in the history of Pennsylvania,” said Governor Josh Shapiro. “This initial investment from Amazon will create thousands of good-paying, stable jobs as Pennsylvania workers build, maintain, and operate the first two data center campuses in Luzerne County and Bucks County. Our team worked closely with local leaders and Amazon to land this deal, and we continue to be actively engaged on securing additional sites in Pennsylvania – helping them secure local support, developing the infrastructure needed to support more data centers, and ensuring our permitting processes move quickly and efficiently. With this historic announcement, we’re creating opportunity for our workers, generating new revenue for our local communities, and ensuring the future of AI runs right through Pennsylvania.” Based on what Shapiro said, the state has tried quite hard to get Amazon to build there instead of somewhere else. States really have to put in effort to convince big tech, as other areas are also clamoring for businesses to set up there too. Back in 2021, we reported that Samsung had agreed to build its Taylor, Texas factory after the state made a tax break offer with the Korean company. The impact on jobs, communities, and the AI landscape Initially, Amazon will need thousands of construction workers to build the data centers and when this is done, it will be hiring 1,250 operators, technicians, and engineers to help manage the facilities - these jobs promise to be high-paying jobs. These jobs are also expected to drive up tax revenues, which will be positive for the state, counties, and municipalities. David Zapolsky, Amazon’s chief global affairs and legal officer, also said that the investments would create workforce development programs and community initiatives for the benefit of residents. It’s unclear from the announcement what form these will take.
  • Recent Achievements

    • Rookie
      CHUNWEI went up a rank
      Rookie
    • Enthusiast
      the420kid went up a rank
      Enthusiast
    • Conversation Starter
      NeoToad777 earned a badge
      Conversation Starter
    • Week One Done
      VicByrd earned a badge
      Week One Done
    • Reacting Well
      NeoToad777 earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      478
    2. 2
      +FloatingFatMan
      281
    3. 3
      ATLien_0
      254
    4. 4
      Edouard
      202
    5. 5
      snowy owl
      201
  • Tell a friend

    Love Neowin? Tell a friend!