Here you go, should be self explanatory with comments. Let me know if you have any questions.
@echo off
set THEME_REGKEY=HKLM\Software\Microsoft\Windows\CurrentVersion\Themes
set THEME_REGVAL=ThemeName
REM Check for presence of key first.
reg query %THEME_REGKEY% /v %THEME_REGVAL% 2>nul || (echo No theme name present! & exit /b 1)
REM query the value. pipe it through findstr in order to find the matching line that has the value. only grab token 3 and the remainder of the line. %%b is what we are interested in here.
set THEME_NAME=
for /f "tokens=2,*" %%a in ('reg query %THEME_REGKEY% /v %THEME_REGVAL% ^| findstr %THEME_REGVAL%') do (
set THEME_NAME=%%b
)
REM Possibly no value set
if not defined THEME_NAME (echo No theme name present! & exit /b 1)
REM replace any spaces with +
set THEME_NAME=%THEME_NAME: =+%
REM open up the default browser, searching google for the theme name
start http://www.google.com/search?q=%THEME_NAME%
REG.EXE
version and requested key appears when executed on WinXP SP3, but script works :) – Orpington