Last active
July 7, 2021 11:05
-
-
Save seia-soto/d0bde55b88242ba942d7a7bcc7cdb1ae to your computer and use it in GitHub Desktop.
NetClass v8 client-side manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
goto init | |
:init | |
cls | |
echo NetClass v8 Client manager | |
echo. | |
title NetClass v8 Client manager | |
:elevate-permission | |
:: Run script in administrator privilege; | |
net file 1>NUL 2>NUL | |
if not '%errorlevel%' == '0' ( | |
echo Trying to run the script in administrator privilege... | |
powershell Start-Process -FilePath "%0" -ArgumentList "%cd%" -verb runas | |
echo If you cannot see any new window running with administrator privilege, please run this file manually with administrator privilege... | |
goto done-exit | |
) | |
:menu | |
echo 1: Stop NetClass v8 service | |
echo 2: Start NetClass v8 service | |
echo 3: Download unicorn HTTPS to indirect firewall | |
echo 4: Stop Virus Chaser service | |
echo 5: Exit | |
echo. | |
set /p N=Enter: | |
if %N%==1 goto stop-service | |
if %N%==2 goto start-service | |
if %N%==3 goto download-uhttps | |
if &N&==4 goto stop-service-viruschaser | |
if %N%==5 goto done-exit | |
goto invalid-command | |
:stop-service | |
:: Stop NetClass v8 service; | |
echo Stopping all NetClass v8 service... | |
powershell -Command "& Stop-Service NC8*" | |
goto done | |
:stop-service-viruschaser | |
:: Stop Virus Chaser Service; | |
echo Stopping all Virus Chaser Service... | |
powershell -Command "& Stop-Service -Name \"Virus Chaser Agent\"" | |
goto done | |
:start-service | |
:: Start NetClass v8 service; | |
echo Starting NC8MoniteringService service... | |
powershell -Command "& Start-Service NC8MoniteringService" | |
goto done | |
:download-uhttps | |
:: Download unicorn HTTPS to indirect firewall | |
echo Downloading unicorn HTTPS for Windows... | |
powershell -Command "& curl https://api.unicorn-soft.com/unicornhttps/v1/download/windows -o %appdata%\\uhttps-installer.exe" | |
echo Executing installer... | |
%appdata%\\uhttps-installer.exe | |
goto done | |
:invalid-command | |
echo Invalid command... | |
echo Press any key to return to menu. | |
pause >NUL 2>&1 | |
cls | |
goto init | |
:done | |
echo. | |
echo All tasks have been completed! | |
echo Press any key to return to menu. | |
pause >NUL 2>&1 | |
goto init | |
:done-exit | |
echo Press any key to exit. | |
pause >NUL | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment