Skip to content

Commit

Permalink
Avoid relying on Server service for determining privilege level in Di…
Browse files Browse the repository at this point in the history
…agReport. Fixes nmap/nmap#1757
  • Loading branch information
bonsaiviking committed Sep 24, 2019
1 parent b4d6a38 commit 62a05f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions installer/DiagReport.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

net session >nul 2>&1
if not "%errorLevel%" == "0" (
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"
Expand All @@ -28,4 +28,4 @@ powershell -noprofile -command "&{start-process powershell -ArgumentList '-nopro

powershell Set-ExecutionPolicy %originPolicy%

rem pause
rem pause

0 comments on commit 62a05f0

Please sign in to comment.