Advertisement
Rick0

FORTIVPN_INSTALL

Jul 20th, 2020
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.98 KB | None | 0 0
  1. @echo off
  2. TITLE INSTALANDO FORTICLIENT VPN
  3. SET "DESTINO=%SYSTEMDRIVE%\Suporte\instaladorvpn.exe"
  4. IF %PROCESSOR_ARCHITECTURE% EQU AMD64 (SET "ORIGEM=\\servidor\pasta\instaladorvpnX64.exe" & SET "VPN=%PROGRAMFILES(X86)%\Fortinet\FortiClient\FortiClient.exe") ELSE (SET "ORIGEM=\\servidor\pasta\instaladorvpnX32.exe" & SET "VPN=%PROGRAMFILES%\Fortinet\FortiClient\FortiClient.exe")
  5. IF NOT EXIST "%VPN%" (GOTO INSTALL) ELSE (GOTO END)
  6. :INSTALL
  7. tasklist | find /i "msiexec.exe" && taskkill /im "msiexec.exe" /F >nul &CLS
  8. IF NOT EXIST "%DESTINO%" (echo f|xcopy /R /S /H /D /V /Y /O /F "%ORIGEM%" "%DESTINO%" >nul & cls)
  9. ::INSTALANDO VPN
  10. ECHO INSTALANDO CLIENTE VPN AGUARDE...
  11. IF EXIST  "%DESTINO%" "%DESTINO%" /quiet /norestart
  12. ::LOGS INSTALAÇÃO VPN
  13. IF %ERRORLEVEL% NEQ 0 (ECHO %COMPUTERNAME%,VPN=FORTCLIENT,ERRO=%ERRORLEVEL%,%date%-%TIME:~0,8% >>"\\servidor\pasta\logvpn\falha.txt" & goto INSTALL) ELSE (ECHO %COMPUTERNAME%,VPN=FORTICLIENT,%date%-%TIME:~0,8% >>"\\servidor\pasta\logvpn\sucesso.txt" & GOTO END)
  14. :END
  15. EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement