Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
Get the Domain on Current User. - Batch Code Bank
Get the Domain on Current User.
Finds Domain on current user on windows and checks if admin privileges are enabled.
@echo off
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: Current permissions inadequate.
)
timeout /t 3 /nobreak > nul
cls
goto :beg
::Begin
:beg
@REM + Find the computer domain name
@echo off
FOR /F "usebackq tokens=*" %%a IN (`wmic.exe COMPUTERSYSTEM GET DOMAIN /Value`) DO (
@((ECHO %%a | findstr /i /c:"Domain=") && SET _str=%%a) > NUL 2>&1
)
FOR /F "tokens=2 delims=^=" %%a IN ("%_str%") do SET _computerDomain=%%a
SET _computerDomain=%_computerDomain: =%
SET _fqdn=%COMPUTERNAME%.%_computerDomain%
@echo off
cls
echo %_fqdn%
pause > nul
exit
Comments
Sorry but there are no comments to display