Edited by HansV to replace % with [%] tags, since % followed by a hexadecimal number messes up the display.
I’m trying to use a BATch file to find if a registry key exists, and populate two lists from there. Here’s what I have so far, as well as the proposed usage using a command line utility called PsExec:
BATch File
—————————————–
@echo off
if exist “HKLMSOFTWAREGoogleGoogle Toolbar” GOTO GOOD
if not exist “HKLMSOFTWAREGoogleGoogle Toolbar” GOTO BAD
:GOOD
echo %computername% >> usmc_nfstranspoupdatesgoogletoobar.txt
GOTO END
:BAD
echo %computername% >> usmc_nfstranspoupdatesnogoogletoolbar.txt
GOTO END
:END
——————————————
I know I’m just missing something small, but I don’t remember what.
Usage:
c:> psexec @c:computers.txt -u admin -c usmc_nfsftranspoupdatesgoogletoolbar.bat