From b0672779459dfdb77f73ffbea1507dd1814c4534 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sat, 24 Feb 2024 16:53:31 +0100 Subject: [PATCH] bugfix and relocation --- {scripts => optional}/config/snapcontrol.ini | 10 ++++--- optional/install-snapcontrol.cmd | 27 ++++++++++++------- optional/startmenu/Drive Snapshot.lnk | Bin 0 -> 1183 bytes scripts/startmenu/Drive Snapshot.lnk | Bin 973 -> 0 bytes 4 files changed, 24 insertions(+), 13 deletions(-) rename {scripts => optional}/config/snapcontrol.ini (84%) create mode 100644 optional/startmenu/Drive Snapshot.lnk delete mode 100644 scripts/startmenu/Drive Snapshot.lnk diff --git a/scripts/config/snapcontrol.ini b/optional/config/snapcontrol.ini similarity index 84% rename from scripts/config/snapcontrol.ini rename to optional/config/snapcontrol.ini index 778e9df..373b8ac 100644 --- a/scripts/config/snapcontrol.ini +++ b/optional/config/snapcontrol.ini @@ -1,12 +1,12 @@ ; SNAPCONTROL config file. -; https://gitea.exabyte-systems.com/WINDOWS/snapcontrol +; https://gitea.exabyte-systems.com/WINDOWS/snapcontrol.git ; ; This tool creates an image backups of windows machines, ; it uses the Drive Snapshot tool by Tom Ehlert Software. ; Please support this great tool and buy a license. ; http://www.drivesnapshot.de/en/order.htm ; -; Copyright (c) 2019-2021 Michael H.G. Schmidt +; Copyright (c) 2019-2024 Michael H.G. Schmidt ; EMAIL: michael@schmidt2.de ; Released under the MIT license. ; @@ -14,7 +14,8 @@ ; [BACKUP] -; path where snapshot.exe and cmail.exe is located ... +; path where cmail.exe is located ... +; (snaphot64.exe, this inifile and snapcontrol.exe must be always located in %WINDIR%!) BinPath = c:\tools ; target PATH examples: @@ -80,6 +81,9 @@ EjectMedia = yes ; should we ask for a shutdown after backup ? (yes/no) AskForShutdown = yes +; should we force a shutdown after the backup run? +; user will NOT be asked for consent! (useful for schedule mode "TIME" and silent mode) +ForcedShutdown = no [LOGGING] diff --git a/optional/install-snapcontrol.cmd b/optional/install-snapcontrol.cmd index 976fdc7..6244719 100644 --- a/optional/install-snapcontrol.cmd +++ b/optional/install-snapcontrol.cmd @@ -3,40 +3,47 @@ call check-for-admin if %ERRORLEVEL% neq 0 exit /b set TOOLS=%SystemDrive%\tools -set INIFILE=..\scripts\config\snapcontrol.ini +set INIFILE=config\snapcontrol.ini set SOFTWARE=..\software +set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\tools" + +if NOT EXIST %SOFTWARE%\snapcontrol.exe ( + echo ERROR: %SOFTWARE%\snapcontrol.exe not found! + exit /b +) echo ####### %0 ####### +echo killing snapcontrol processes... +taskkill /F /IM snapcontrol.exe 2>nul + +echo killing snapshot processes... +taskkill /F /IM snapshot64.exe 2>nul + echo copy snapcontrol binary to [ %windir% ] ... copy /Y %SOFTWARE%\snapcontrol.exe %windir% 2>nul if EXIST %SOFTWARE%\snapshot64_licensed.exe ( - echo copying LICENSED snapshot64 to %windir% ... copy /Y %SOFTWARE%\snapshot64_licensed.exe %windir%\snapshot64.exe - ) else ( - echo copying STANDARD snapshot64 to boot image ... - copy /Y %SOFTWARE%\snapshot64.exe %windiw% - + copy /Y %SOFTWARE%\snapshot64.exe %windir% ) if NOT EXIST %windir%\snapcontrol.ini ( - echo copying STANDARD inifile to %windir% ... copy /Y %INIFILE% %windir% - ) else ( - echo inifile already copied. nothing to do! - ) echo creating scheduler task ... %windir%\snapcontrol /I +echo copy startmenu link ... +copy /Y "startmenu\Drive Snapshot.lnk" %STARTMENU% + echo ####### %0 ####### pause diff --git a/optional/startmenu/Drive Snapshot.lnk b/optional/startmenu/Drive Snapshot.lnk new file mode 100644 index 0000000000000000000000000000000000000000..ac9af82fd0d40a18e3b889549e75d11ac84279c7 GIT binary patch literal 1183 zcmaJ=T}YEr7=C72{?Ti`ds@pVJ0{Hh&h0lNR}1EKuD1Be%hqb_uJGa;W<3-`=0l_=Q-~==RNfR47o{^ zz?3dgdk3j7(e{6unYFji8OG*E=F6yOGRLF+ZF2_mm#uoFAr`+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