Saved Bookmarks
| 1. |
Solve : Simple .exe to detect if that .exe is being run as admin or user? |
|
Answer» os: xp and 7 google doesn't help much Really? Quote from: fhunt on April 28, 2012, 02:56:58 AM Thank you very much, that was exactly what i was looking for Personally I would do something like this... I would put @echo off as the very first line of the batch SCRIPT (this is usual) @echo off for /f "tokens=4" %%A in ('net user %username% ^| find "Local Group Memberships"') do set usertype=%%A if "%usertype%"=="*Administrators" goto Admin echo This user is not a member of the Administrators group goto End :Admin echo This user is a member of the Administrators group :End pause |
|