Hello guys i am checking for EnabledGuestAccount settings from a text file. There will be two results which is EnabledGuestAccount = 0 or EnabledGuestAccount = 1.
Basically i would like my batch file to a line of string "EnabledGuestAccount = Disabled" when it is = EnabledGuestAccount = 0 is found and "EnabledGuestAccount = Enabled" when it is = 1...thanks in advance!
Command
findstr /i /C:"EnableGuestAccount " C:\major_security_settings1.txt
Is it 'EnabledGuestAccount'or 'EnableGuestAccount'?
I've gone with EnabledGuestAccount...@echo off findstr /i /C:"EnabledGuestAccount = 1" C:\major_security_settings1.txt> nul if %errorlevel% neq 1 ( echo EnabledGuestAccount = Enabled ) else ( echo EnabledGuestAccount = Disabled )
thank you very much!
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |