[SOLVED] How to remove folders from navigation pane in windows explorer?

Sep 13, 2020
7
0
10
BNJiySy.png

I created this folder by mistake and now I cannot remove it, please help
 
Sep 13, 2020
7
0
10
How did you create a folder what were the steps that you took
Code:
@ECHO OFF
SETLOCAL EnableExtensions
set "_icon=%%SystemRoot%%\system32\shell32.dll,176" # any valid icon
set "_name=Downloads"                               # any valid name
set "_guid=ffffffff-ffff-ffff-0000-00000000c0deqqqq"    # a valid GUID (no braces)
set "_target=D:\users\Downloads"                  # any valid local path

set "_regK=HKCU\Software\Classes\CLSID"
set "_regE=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer"
if NOT "%~1"=="" goto :deleAll
reg add %_regK%\{%_guid%} /ve /t REG_SZ /d "%_name%" /f
reg add %_regK%\{%_guid%}\DefaultIcon /ve /t REG_EXPAND_SZ /d %_icon% /f
reg add %_regK%\{%_guid%} /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0x1 /f
reg add %_regK%\{%_guid%} /v SortOrderIndex /t REG_DWORD /d 0x42 /f
reg add %_regK%\{%_guid%}\InProcServer32 /ve /t REG_EXPAND_SZ /d %%systemroot%%\system32\shell32.dll /f
reg add %_regK%\{%_guid%}\Instance /v CLSID /t REG_SZ /d {0E5AAE11-A475-4c5b-AB00-C66DE400274E} /f
reg add %_regK%\{%_guid%}\Instance\InitPropertyBag /v Attributes /t REG_DWORD /d 0x11 /f
reg add %_regK%\{%_guid%}\Instance\InitPropertyBag /v TargetFolderPath /t REG_EXPAND_SZ /d "%_target%" /f
reg add %_regK%\{%_guid%}\ShellFolder /v FolderValueFlags /t REG_DWORD /d 0x28 /f
reg add %_regK%\{%_guid%}\ShellFolder /v Attributes /t REG_DWORD /d 0xF080004D /f
reg add %_regE%\Desktop\NameSpace\{%_guid%} /ve /t REG_SZ /d "%_name%" /f
reg add %_regE%\HideDesktopIcons\NewStartPanel /v {%_guid%} /t REG_DWORD /d 0x1 /f

:endlocal
ENDLOCAL
goto :eof

:deleAll
reg delete %_regK%\{%_guid%}                                   /f
reg delete %_regE%\Desktop\NameSpace\{%_guid%}                 /f
reg delete %_regE%\HideDesktopIcons\NewStartPanel /v {%_guid%} /f
goto :endlocal

I searched online found this .bat file and ran it
 
D

Deleted member 14196

Guest
Well since you messed with the registry which is a big no-no there’s no easy way to recover from this I would back up all my data and do a clean install of windows and don’t touch the registry there’s no need for you to create a folder like this

What purpose did you think this would serve? That batch file does damage to your registry. What is it you were trying to accomplish? In any case a clean install is what you need
 

gardenman

Splendid
Moderator
Hi, the batch file has 2 "functions" in it, one adds registry keys, a 2nd one deletes registry keys. This is probably how you can "undo" what it has done. I say "probably" because I tried testing it, but it doesn't work for me (even after restarting Explorer).

Anyway, this line:
if NOT "%~1"=="" goto :deleAll
basically means "If there is a parameter, go to the section that deletes the registry info".

If you want to try to delete the reg keys, you can simply drag and drop a file (any file) onto the batch file itself. This will make the batch file run with a parameter, which is what triggers it to delete some registry keys.

After that, you might need to reboot, or restart Windows Explorer. Maybe that will help, maybe not. I can't say for sure because the batch file simply doesn't work (on Windows 10 ver 2004).
 

Colif

Win 11 Master
Moderator
Could run system restore and see if there is a date prior to the changes as it includes a copy of the registry so you can just make it like the changes never happened

type "restore" then open "create a restore point"
create a new Restore Point now for C-drive
then open the newest restore point that is prior to the problem happening (if you have one)
 
Sep 13, 2020
7
0
10
Could run system restore and see if there is a date prior to the changes as it includes a copy of the registry so you can just make it like the changes never happened

type "restore" then open "create a restore point"
create a new Restore Point now for C-drive
then open the newest restore point that is prior to the problem happening (if you have one)
I checked, unfortunately there is no system restore available.
this problem is just annoying.
 
Sep 13, 2020
7
0
10
Hi, the batch file has 2 "functions" in it, one adds registry keys, a 2nd one deletes registry keys. This is probably how you can "undo" what it has done. I say "probably" because I tried testing it, but it doesn't work for me (even after restarting Explorer).

Anyway, this line:
if NOT "%~1"=="" goto :deleAll
basically means "If there is a parameter, go to the section that deletes the registry info".

If you want to try to delete the reg keys, you can simply drag and drop a file (any file) onto the batch file itself. This will make the batch file run with a parameter, which is what triggers it to delete some registry keys.

After that, you might need to reboot, or restart Windows Explorer. Maybe that will help, maybe not. I can't say for sure because the batch file simply doesn't work (on Windows 10 ver 2004).
I have no idea how to do that, can you elaborate?
 

TRENDING THREADS