You're setting hkeyuserpath inside of a for loop, so you have to use delayedexpansion to access the variable.
setlocal enabledelayedexpansion
for /f %%a in ('reg query HKEY_USERS') do (
echo %%~na
set hkeyuserpath="HKEY_USERS\%%~na\Software\Microsoft\Windows\CurrentVersion\Run"
reg query "!hkeyuserpath!" /v *WhatIamLookingFor*
if not errorlevel 1 (
Echo(Hello & goto :end
) ELSE (
Echo(Goodbye
)
)
:end
pause