Seafile settings on Install #57
This commit is contained in:
parent
3fbef2b19b
commit
af6f409bb4
@ -5,6 +5,8 @@ if %ERRORLEVEL% neq 0 exit /b
|
||||
set OPT=..\optional
|
||||
set SOFTWARE=..\software
|
||||
set MSI=seafile-setup.msi
|
||||
set SETTINGS=..\company\settings.cmd
|
||||
set seafile_server_url=0
|
||||
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"
|
||||
|
||||
if NOT EXIST %SOFTWARE%\%MSI% (
|
||||
@ -12,6 +14,18 @@ if NOT EXIST %SOFTWARE%\%MSI% (
|
||||
exit /b
|
||||
)
|
||||
|
||||
rem ===================
|
||||
rem CONFIGFILE CHECK
|
||||
rem ===================
|
||||
|
||||
if NOT EXIST %SETTINGS% (
|
||||
echo.
|
||||
echo WARNING: %SETTINGS% NOT FOUND
|
||||
echo.
|
||||
) else (
|
||||
call %SETTINGS%
|
||||
)
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
echo installing SeaFile ...
|
||||
@ -37,6 +51,19 @@ rd /S /Q %STARTMENU%\"Seafile" 2>nul
|
||||
echo refreshing desktop (W10 style) ...
|
||||
ie4uinit.exe -show
|
||||
|
||||
if seafile_server_url == 0 (
|
||||
echo no SeaFile server URL found!
|
||||
) else (
|
||||
|
||||
echo setting SeaFile server URL ...
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\SeaFile" ^
|
||||
/v "PreconfigureServerAddr" /d "%seafile_server_url%" /t REG_SZ /f 1>nul
|
||||
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\SeaFile" ^
|
||||
/v "PreconfigureServerAddrOnly" /d 1 /t REG_SZ /f 1>nul
|
||||
|
||||
)
|
||||
|
||||
echo ####### %0 #######
|
||||
pause
|
||||
|
||||
|
@ -24,6 +24,7 @@ set LANG=en-US
|
||||
set support_user=
|
||||
set support_password=
|
||||
set emclient_license=0
|
||||
set seafile_domain=0
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
@ -98,19 +99,22 @@ echo remapping Desktop folder to standard location ...
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^
|
||||
/v Desktop /t REG_EXPAND_SZ /d "%%USERPROFILE%%\Desktop" /f 1>nul
|
||||
|
||||
rem =========
|
||||
rem SEAFILE
|
||||
rem fix for broken SEAFILE folder access rights ...
|
||||
if EXIST %USERPROFILE%\Seafile (
|
||||
echo removing SEAFILE system attributes ...
|
||||
attrib -S %USERPROFILE%\Seafile /S /D
|
||||
)
|
||||
rem =========
|
||||
|
||||
rem adding autostart for SEAFILE ...
|
||||
rem check for existence of client binary ...
|
||||
if EXIST "%ProgramFiles%\Seafile\bin\seafile-applet.exe" (
|
||||
echo setting autostart for SEAFILE ...
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ^
|
||||
/v Seafile /t REG_SZ /d "%ProgramFiles%\Seafile\bin\seafile-applet.exe" /f 1>nul
|
||||
)
|
||||
|
||||
rem fix for broken SEAFILE folder access rights ...
|
||||
if EXIST %USERPROFILE%\Seafile (
|
||||
echo removing SEAFILE folder system attributes ...
|
||||
attrib -S %USERPROFILE%\Seafile /S /D
|
||||
)
|
||||
|
||||
rem ==================================================
|
||||
rem USER TWEAKS AND CONFIG FILES (this runs only once)
|
||||
@ -227,6 +231,25 @@ powershell -command %TOOLS%\scripts\disable-networkfeatures.ps1
|
||||
rem try to cleanup the tiles in the start menu (only for admins)
|
||||
call %TOOLS%\scripts\cleanup-tiles.cmd
|
||||
|
||||
rem =========
|
||||
rem SEAFILE
|
||||
rem =========
|
||||
|
||||
echo setting path for SEAFILE files ...
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\SeaFile" ^
|
||||
/v "PreconfigureDirectory" /d "%USERPROFILE%" /t REG_SZ /f 1>nul
|
||||
|
||||
echo setting USERNAME for SEAFILE ...
|
||||
if seafile_domain == 0 (
|
||||
echo no SeaFile domain found - cannot guess username!
|
||||
) else (
|
||||
echo guessing SEAFILE username and setting token...
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\SeaFile" ^
|
||||
/v "PreconfigureUsername" /d "%USERNAME%@%seafile_domain%" /t REG_SZ /f 1>nul
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\SeaFile" ^
|
||||
/v "PreconfigureUserToken" /d "null" /t REG_SZ /f 1>nul
|
||||
)
|
||||
|
||||
rem create a statusfile (this codeblock must be executed only once per user) ...
|
||||
echo 1 >%USERCONFIG_DONE%
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user