| Server IP : 121.121.20.254 / Your IP : 216.73.217.51 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/Npcap/ |
Upload File : |
@echo off
whoami /Groups | find "S-1-16-12288" >NUL
if ERRORLEVEL 1 (
rem This tools must run with administrator permissions
rem It will popup the UAC dialog, please click [Yes] to continue.
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "%*", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /b 2
)
set dir=%~dp0
set scriptPath=%dir%DiagReport.ps1
for /f "tokens=*" %%a in ('powershell Get-ExecutionPolicy') do (
set originPolicy=%%a
)
powershell Set-ExecutionPolicy 0
rem this call only works for Administrator
rem powershell %scriptPath%
rem This call works also for normal users
rem "No Exit" version:
rem powershell -NoExit -noprofile -command "&{start-process powershell -ArgumentList '-NoExit -noprofile -file \"%scriptPath%\"' -verb RunAs}"
rem "Exit" version:
powershell -noprofile -command "&{start-process powershell -ArgumentList '-noprofile -file \"%scriptPath%\"' -verb RunAs}"
powershell Set-ExecutionPolicy %originPolicy%
rem pause