diff --git a/tools/logon.cmd b/tools/logon.cmd index 8d4df7e..b501c41 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -7,6 +7,7 @@ rem =================== set TOOLS=%SystemDrive%\tools set SCRIPT_SETTINGS=%TOOLS%\scripts\settings.cmd set COMPANY_SETTINGS=%TOOLS%\company\settings.cmd +set CUSTOM_SCRIPT=%TOOLS%\company\custom.cmd set USERCONFIG_DONE="%LOCALAPPDATA%"\.userconfig_done set EMLICENSE_DONE="%LOCALAPPDATA%"\.emlicense_done set STARTMENU=%APPDATA%\Microsoft\Windows\Start Menu\Programs @@ -508,13 +509,16 @@ echo Starting the workstation service ... net start workstation 1>nul 2>nul net config workstation -echo ####### %0 ####### +rem ================================================= +rem search for custom script (only with ADMIN rights) +rem ================================================= -if %ERRORLEVEL% NEQ 0 ( - echo # unknown ERROR! # - echo ####### %0 ####### - echo. - pause +isuseradmin +if %ERRORLEVEL% == 0 ( + if EXIST %CUSTOM_SCRIPT% ( + echo OK. Calling custom script ... + call %CUSTOM_SCRIPT% + ) ) goto END @@ -550,7 +554,7 @@ ping 127.0.0.1 -n 3 >nul 2>nul start explorer.exe goto :eof -rem #################################################### - :END +echo. +echo ####### %0 #######