@echo off
net.exe session 1>NUL 2>NUL && (
goto gotAdmin
) || (
goto UACPrompt
)
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
:begin
color 3F
@echo on
net user workplace Nexperia1.. /add
net localgroup Administrators workplace /add
net localgroup "Remote Desktop Users" workplace /add
wmic.exe UserAccount Where Name="menhera" Set PasswordExpires="false"
pause
评论区