From 5305626ddd6d82296d350422896554fbe517645c Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 22 Jan 2023 13:55:18 +0100 Subject: [PATCH] no seafile and no emclient for the admin(support) user --- tools/logon.cmd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/logon.cmd b/tools/logon.cmd index 1a6c19e..22836f1 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -80,7 +80,8 @@ echo Remapping Desktop folder to standard location ... reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^ /v Desktop /t REG_EXPAND_SZ /d "%USERPROFILE%\Desktop" /f 1>nul -if EXIST "%ProgramFiles%\Seafile\bin\seafile-applet.exe" ( +rem NO seafile Autostart for the Admin! +if EXIST "%ProgramFiles%\Seafile\bin\seafile-applet.exe" if "%USERNAME%" NEQ "%SUPPORT_USER%" ( echo Setting autostart for SEAFILE client ... reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ^ /v Seafile /t REG_SZ /d "%ProgramFiles%\Seafile\bin\seafile-applet.exe" /f 1>nul @@ -97,7 +98,10 @@ rem EMCLIENT LICENSING rem =================== rem licensing for emClient already done ? -if EXIST %EMLICENSE_DONE% GOTO EMCLIENT_END +if EXIST %EMLICENSE_DONE% GOTO EMCLIENT_DONE + +rem no emClient for the Admin! +if "%USERNAME%" == "%SUPPORT_USER%" GOTO EMCLIENT_DONE if %emclient_license% == 0 ( echo no emClient license found! @@ -116,7 +120,7 @@ if %emclient_license% == 0 ( echo. ) -:EMCLIENT_END +:EMCLIENT_DONE rem ===================================================== rem ACCOUNT TWEAKS AND CONFIG FILES (this runs only once) @@ -278,6 +282,9 @@ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" ^ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" ^ /v "ShowFrequent" /t REG_DWORD /d 0 /f 1>nul +rem no SEAFILE for the Admin! +if "%USERNAME%" == "%SUPPORT_USER%" GOTO SEAFILE_DONE + echo. echo preparing the SEAFILE configuration echo ######################################## @@ -296,6 +303,7 @@ if seafile_domain == 0 ( reg add "HKCU\SOFTWARE\SeaFile" ^ /v "PreconfigureUserToken" /d "dummy" /t REG_SZ /f 1>nul ) +:SEAFILE_DONE echo. echo reorganizing start menu and desktop