Obtaining the values of specific registry keys to a batch file

(imported topic written by SystemAdmin)

Need some assistance in figuring out what I am doing wrong. The resulting batch file is only echoing the complete line that I am asking instead of the values of the registry entries. Any assistancve is appreciated.

if ((exists keys whose ((it contains “Google Chrome”) of (value “UninstallString” of it as string as lowercase)) of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall” of registry) AND ((exists keys whose ((it contains “Update”) of (value “UninstallString” of it as string as lowercase)) of key “HKLM\SOFTWARE\Google” of registry)))

endif

delete __createfile

createfile until @end_create_file

appendfile @Echo Off

appendfile “Made it here 1”

appendfile (concatenation “%0d%0a” of (value “UninstallString” of it as string as lowercase) of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome” of registry)

appendfile (concatenation “%0d%0a” of (value “UninstallString” of it as string as lowercase) of key “HKLM\SOFTWARE\Google\Update” of registry)

appendfile {“Made it here 2”}

appendfile (C:\Program Files\Google\Google Toolbar\Component\GoogleToolbarManager_B12CA2CBE40DD1A2.exe /uninstall)

appendfile (C:\Program Files\Google\Chrome\Application\12.0.742.100\Installer\setup.exe --uninstall --system-level)

appendfile (“Made it her 3”)

@end_create_file

copy __createfile c:\temp\unchrome.bat

(imported comment written by jeremylam)

In actions, you need to escape relevance statements with braces for them to be evaluated:

appendfile until __END__ appendfile exists file 
"C:\autoexec.bat" appendfile 
{exists file 
"C:\autoexec.bat"
} __END__

will create the following file:

exists file 
"C:\autoexec.bat" 

true