w10install/scripts/modify-explorer.cmd
2023-02-08 16:12:23 +01:00

58 lines
1.7 KiB
Batchfile

@echo off
set SCRIPT_SETTINGS=settings.cmd
set COMPANY_SETTINGS=..\company\settings.cmd
rem default: disabled
set explorer_quick_access=0
echo ####### %0 #######
echo.
echo searching for SCRIPT settings ...
if NOT EXIST %SCRIPT_SETTINGS% (
echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND
) else (
echo OK. Loading SCRIPT settings ...
call %SCRIPT_SETTINGS%
)
echo.
echo searching for COMPANY settings ...
if NOT EXIST %COMPANY_SETTINGS% (
echo INFO: config file %COMPANY_SETTINGS% NOT FOUND
) else (
echo OK. Loading COMPANY settings ...
call %COMPANY_SETTINGS%
)
echo ++++++++++++++++++++++++++++++++++
echo explorer_quick_access=%explorer_quick_access%
echo ++++++++++++++++++++++++++++++++++
echo.
if %explorer_quick_access% == 0 (
echo disabling explorer quick access ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^
/v "HubMode" /t REG_DWORD /d 1 /f
) else (
echo enabling explorer quick access ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^
/v "HubMode" /t REG_DWORD /d 0 /f
)
echo disabling network icon ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\NonEnum" ^
/v "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /t REG_DWORD /d 1 /f
echo removing 3d Objects ...
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 2>nul
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 2>nul
echo restarting explorer ...
taskkill /f /im explorer.exe 1>nul 2>nul
start explorer.exe
echo ####### %0 #######