N
N
NikSIk312021-02-19 05:12:14
Windows
NikSIk31, 2021-02-19 05:12:14

Opening local explorer from browser?

I watched this article on how to open a folder in File Explorer on a computer from a browser. Something is going wrong.
I'm using Vagrant (Homestead). (mb this will somehow play a role)

I do everything according to the guide:

1) The tmproto.reg file (located on the desktop)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\tmproto]
"URL Protocol"=""
@="URL:<b>http://local-tm.loc/</b>"

[HKEY_CLASSES_ROOT\tmproto\shell]

[HKEY_CLASSES_ROOT\tmproto\shell\open]

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


PS I changed the address local-tm.loc both in the guide and to the local one, it doesn't help.

2) Threw in C:\Windows tmproto.bat
@echo off
set "path=%~1"
setlocal enabledelayedexpansion
set path=%path:tmproto://=%
set path=%path:"=%
set path=%path:/=\%
set path=!path:%%20= !
set path=!path:%%5C=\!
C:\Windows\explorer.exe "%path%"


----------------------

When trying to open
<a href="tmproto://C:/Windows/">Open</a> // этот путь я пытался менять - бесполезно

i get a select box.
602f1d9base9c053744520.png
I choose my protocol - an error
602f1daad7719666667513.png
I choose explorer.exe - an error (although this executable is on the specified path [I chose it] + launched it)
602f1db772ff0563759971.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-02-19
@NikSIk31

2) Threw in C:\Windows tmproto.bat

Where should the batch file be?
@="\"C:\\tmproto.bat\" \"%1\""
@="URL: local-tm.loc "

This is just a description of the circuit, no addresses are needed here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question