Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:30:21+00:00 2026-05-13T12:30:21+00:00

I came across a small hack, which claims it enables smb:// on windows. The

  • 0

I came across a small hack, which claims it enables smb:// on windows.
The complaint was that things like <a href="\\computername\path\file.ext">text</a> weren’t working.
While true that you can use file:///// in your url’s, the user wanted to use smb:// so that it’s cross-platform.

The hack goes as follows:
1) Create this Reg file, save and execute it:

REGEDIT4

[HKEY_CLASSES_ROOT\smb]
@="URL:smb Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\smb\shell]

[HKEY_CLASSES_ROOT\smb\shell\open]

[HKEY_CLASSES_ROOT\smb\shell\open\command]
@="\"C:\\smb.bat\" \"%1\""

And then create the smb.bat file in your C-folder, containing this:

@echo off
cd C:\
set url=%~dpnx1
explorer \%url:~7%
exit

My question: how safe is this, and any other thoughts on the matter? Besides the file:///// thing I mean.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:30:21+00:00Added an answer on May 13, 2026 at 12:30 pm

    To me, it looks damn dangerous because it allows any website to place “\\RESOURCENAME” URLs, which will work regardless of context, and smb.bat will be called if you click such a link. I don’t entirely understand the batch syntax (the ~ part especially) but it seems to me it’s possible to pass any kind of argument to explorer.exe.

    There’s probably no immediate danger because it’s very unlikely an outside attacker would guess you have this set up. Still, safe it’s not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across a parsing problem, which would take a quite small regular expression
I am working on a small project and I came across that problem. The
In a small project of mine I've came across the need of a collapsible
Kicking around some small structures while answering this post , I came across the
Came across something like this today, and was wondering if there was an equivalent
I came across a printed article by Bertrand Meyer where he states that tests
I came across a controller in an older set of code (Rails 1.2.3) that
I've came across various style switchers that allow you to change the stylesheet (i.e.
I'm building something similar to a Blogfarm and I came across a small hurdle.
I recently came across classes that use a configuration object instead of the usual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.