From 6097a559058fc78d1d4f64e499a4c07ab0ec9294 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Thu, 16 Feb 2023 14:32:10 +0100 Subject: [PATCH] moved some scripts to user area --- optional/{ => users}/install-spotify.cmd | 4 +--- optional/{ => users}/install-teams.cmd | 2 +- optional/{ => users}/install-telegram.cmd | 2 +- scripts/mkinstall_links.cmd | 26 +++++++++++++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) rename optional/{ => users}/install-spotify.cmd (72%) rename optional/{ => users}/install-teams.cmd (93%) rename optional/{ => users}/install-telegram.cmd (90%) create mode 100644 scripts/mkinstall_links.cmd diff --git a/optional/install-spotify.cmd b/optional/users/install-spotify.cmd similarity index 72% rename from optional/install-spotify.cmd rename to optional/users/install-spotify.cmd index 4934eb4..3add031 100644 --- a/optional/install-spotify.cmd +++ b/optional/users/install-spotify.cmd @@ -1,8 +1,6 @@ @echo off -call check-for-admin -if %ERRORLEVEL% neq 0 exit /b -set EXE=..\software\spotify-setup.exe +set EXE=%SystemDrive%\tools\software\spotify-setup.exe if NOT EXIST %EXE% ( echo ERROR: %EXE% not found! diff --git a/optional/install-teams.cmd b/optional/users/install-teams.cmd similarity index 93% rename from optional/install-teams.cmd rename to optional/users/install-teams.cmd index f121896..a692d43 100644 --- a/optional/install-teams.cmd +++ b/optional/users/install-teams.cmd @@ -1,6 +1,6 @@ @echo off -set EXE=..\software\teams-setup.exe +set EXE=%SystemDrive%\tools\software\teams-setup.exe if NOT EXIST %EXE% ( echo ERROR: %EXE% not found! diff --git a/optional/install-telegram.cmd b/optional/users/install-telegram.cmd similarity index 90% rename from optional/install-telegram.cmd rename to optional/users/install-telegram.cmd index 7e339d4..1f27fbd 100644 --- a/optional/install-telegram.cmd +++ b/optional/users/install-telegram.cmd @@ -1,6 +1,6 @@ @echo off -set EXE=..\software\telegram-setup.exe +set EXE=%SystemDrive%\tools\software\telegram-setup.exe set STARTMENU_USER="%APPDATA%\Microsoft\Windows\Start Menu\Programs" if NOT EXIST %EXE% ( diff --git a/scripts/mkinstall_links.cmd b/scripts/mkinstall_links.cmd new file mode 100644 index 0000000..ef4e723 --- /dev/null +++ b/scripts/mkinstall_links.cmd @@ -0,0 +1,26 @@ +@echo off + +set TOOLS=%SystemDrive%\tools +set STARTMENU=%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs + +echo ####### %0 ####### + +IF NOT EXIST ..\optional\users ( + echo ..\optional\users NOT found! + goto END +) else ( + + echo creating install links in users start menu ... + mkdir "%STARTMENU%\INSTALL" + + cd ..\optional\users + FOR %%L in (*.cmd) do ( + echo processing ... [ %%L ] + mklink "%STARTMENU%\INSTALL\%%L" %TOOLS%\optional\users\%%L 2>nul + ) + +) + +:END +echo ####### %0 ####### +