From b224cb5b23cc8f41e91416879a7f681ad252d7dd Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 14 Mar 2021 11:53:43 +0100 Subject: [PATCH] bugfixing --- optional/install-totalcommander.cmd | 8 +++++++- scripts/cleanup-startmenu.cmd | 18 +++++++++++++++++- tools/logon.cmd | 27 ++++++++++++++++++++------- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/optional/install-totalcommander.cmd b/optional/install-totalcommander.cmd index 5f5de29..6940f59 100644 --- a/optional/install-totalcommander.cmd +++ b/optional/install-totalcommander.cmd @@ -3,6 +3,8 @@ set EXE=..\software\totalcommander-setup.exe set KEY=..\personal\wincmd.key set TARGET=c:\totalcmd +set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs" +set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs" if NOT EXIST %EXE% ( echo ERROR: %EXE% not found! @@ -14,9 +16,13 @@ echo ####### %0 ####### echo installing TotalCommander ... start /wait %EXE% /AHMGDU -echo renaming and moving TotalCommander desktop link ... +rem ... stupid Total Commander is installing its links to user area ? WTF ? +echo renaming and moving TotalCommander desktop link to public desktop ... move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\TCM.lnk" +echo moving start menu entries to public area ... +move /Y %STARTMENU_USER%\"Total Commander" %STARTMENU% 2>nul + if EXIST %KEY% ( echo installing license ... copy /Y %KEY% %TARGET% diff --git a/scripts/cleanup-startmenu.cmd b/scripts/cleanup-startmenu.cmd index 9d216fd..d8b5ca8 100644 --- a/scripts/cleanup-startmenu.cmd +++ b/scripts/cleanup-startmenu.cmd @@ -1,6 +1,7 @@ @echo off -set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" +set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs" +set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs" echo ####### %0 ####### @@ -24,6 +25,21 @@ rem VLC ... move /Y %STARTMENU%\"VideoLan\VLC media player.lnk" %STARTMENU% 2>nul rd /S /Q %STARTMENU%\VideoLan 2>nul +rem Windows stuff (Character map)... +move /Y %STARTMENU%\"Accessories\System Tools\Character*.*" ^ + %STARTMENU%\"Accessories" 2>nul +rd /S /Q %STARTMENU%\"Accessories\System Tools" 2>nul + +rem ... stupid OS problem #5 +rem why the heck are "System Tools" installed per user ? stupid Microsoft. +move /Y %STARTMENU_USER%\"System Tools\*.*" ^ + %STARTMENU%\"System Tools" 2>nul + +rem ... stupid OS problem #6 +rem same here for the accessibility tools. WHY ? stupid Microsoft. +move /Y %STARTMENU_USER%\"Accessibility\*.*" ^ + %STARTMENU%\"Accessibility" 2>nul + echo start explorer again ... ping 127.0.0.1 -n 3 >nul 2>nul start explorer.exe diff --git a/tools/logon.cmd b/tools/logon.cmd index 8aa4865..6b896a3 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -1,6 +1,7 @@ @echo off set TOOLS=c:\tools set STATUSFILE=%LOCALAPPDATA%\.user_settings_done +set STARTMENU=%APPDATA%\"Microsoft\Windows\Start Menu\Programs" echo ####### %0 ####### @@ -119,13 +120,6 @@ rem config must be full qualified pathname (OpenShell BUG!) set CONFIG=%TOOLS%\scripts\config\OpenshellSettings.xml "%ProgramFiles%\Open-Shell\StartMenu.exe" -xml %CONFIG% -rem ... stupid os problem #4 -echo removing some useless files ... -del /F %APPDATA%\"Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk" 2>nul -del /F %APPDATA%\"Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk" 2>nul -rd /S /Q %APPDATA%\"Microsoft\Windows\Start Menu\Programs\Maintenance" 2>nul -del /F "%USERPROFILE%\Desktop\Microsoft Edge.lnk" 2>nul - echo restarting explorer ... taskkill /f /im explorer.exe 2>nul timeout /T 2 @@ -141,6 +135,25 @@ echo ##### cleaning ... echo ##### echo. +rem ... stupid os problem #4 +rem (has to be done over and over again - some zombies keep coming back ...) +echo removing and some useless links in start menu and desktop ... + +rem Edge is such a zombie! +del /F %STARTMENU%\"Microsoft Edge.lnk" 2>nul +del /F %USERPROFILE%\"Desktop\Microsoft Edge.lnk" 2>nul + +rem IE too! +del /F %STARTMENU%\"Accessories\Internet Explorer.lnk" 2>nul + +rem finally remove some useless directories in the users start menu ... +rd /S /Q %STARTMENU%\"Accessories" 2>nul +rd /S /Q %STARTMENU%\"Accessibility" 2>nul +rd /S /Q %STARTMENU%\"Administrative Tools" 2>nul +rd /S /Q %STARTMENU%\"Maintenance" 2>nul +rd /S /Q %STARTMENU%\"System Tools" 2>nul +rd /S /Q %STARTMENU%\"Windows Powershell" 2>nul + echo 3D Objects ... rd /S /Q %USERPROFILE%\"3D Objects" 2>nul