Advertisement
Rick0

IMPORT_VPN

Jul 20th, 2020 (edited)
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.68 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. pushd "%~dp0"
  4. IF %PROCESSOR_ARCHITECTURE% EQU AMD64 (SET "VPN=%PROGRAMFILES(X86)%\Fortinet\FortiClient") ELSE (SET "VPN=%PROGRAMFILES%\Fortinet\FortiClient")
  5. SET "CONF=%VPN%\FCConfig.exe"
  6. SET "FCLI=%VPN%\Forticlient.exe"
  7. ::CAMINHO IMPORTANDO ARQUIVO=PASTA ATUAL
  8. SET "FVPN=%~dp0CONFIGVPN"
  9. ::REMOVENDO A OPCAO import -p "senhavpn45*" importa a configuracao sem senha
  10. IF EXIST "%FCLI%" (start "" "%FCLI%" & tasklist | find /i "Forticlient.exe" && taskkill /im "Forticlient.exe" /F >nul &CLS)
  11. IF EXIST "%CONF%" ("%CONF%" -f "%FVPN%" -m all -o import -p "senhavpn45*" & if exist "%FVPN%" del /f /q "%FVPN%" & start "" "%FCLI%")
  12. POPD
  13. ENDLOCAL
  14. EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement