Example
C:\Users\MyUser>net user
User accounts for \\Test
-------------------------------------------------------------------------------
Administrator DefaultAccount Guest
MyUser
The command completed successfully.
I found this code and played about a bit with it and maid a menu in different colour texts
Code: Select all
:A
@echo off
@Echo Off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
call :colorEcho A0 "1)Main Menu"
echo.
call :colorEcho C0 "2)Exit"
echo.
set /p op=Enter Command Here
if %op% ==1 goto 1
if %op% ==2 goto 2
:1
cls
net user
pause
cls
goto A
:2
exit
:colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i
it works a dream only I need to find a way if possible to search for a given work and highlight that coulor in Green but not sure how or if it can be done.
Any advise is much appreciated.
Thank you for taking the time to read this post.
Kind Regards
Bradley