trilium-no-cert-check.bat 658 B

1234567891011121314151617181920212223
  1. @echo off
  2. :: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
  3. :: If there's no powershell available, fallback to unicode enabled command interpreter
  4. WHERE powershell.exe > NUL 2>&1
  5. IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
  6. :POWERSHELL
  7. powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0; ./trilium.exe"
  8. GOTO END
  9. :BATCH
  10. :: Make sure we support UTF-8 characters
  11. chcp 65001
  12. :: Get Current Trilium executable directory and compute data directory
  13. SET DIR=%~dp0
  14. set NODE_TLS_REJECT_UNAUTHORIZED=0
  15. cd %DIR%
  16. start trilium.exe
  17. GOTO END
  18. :END