Help with syntax please.
I am looking for a reg key and if it's there great put a flag file in if it's not install from a network share, just not sure how to use the else command.
reg query "HKEY\xxx\xxx\Uninstall\{xxxx}"
if %errorlevel% EQU 0 (
echo %date% %computername% Installed >> "C:\Windows\System32\Flags\xxx.txt"
)
This is where I would like to put "Else" install "\\server\share\xxx.cmd" /qn
I'm not sure how to use the else command
I am very new to scripting and you help is appreciated.