Hello again,
I am having an issue with a .bat that I have written. All it does is tell me which version of a program is installed. But I am trying to remember how to write the FOR statement so that if the program is not installed it show a message and not the error stating the registry entry does not exist. It is a simple FOR statement but I am having issues writing the Else portion of it. All I get with the FOR statements I write with the else do not even work...
Please help.
Below is the Working For statement.
FOR /F "tokens=2* delims= " %%A IN ('REG Query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SnagIt7" /v DisplayVersion') DO Set _Snaginf=%%B
echo . = SnagIt Version %_Snaginf% is installed.
Please help.
Thanks again.
I am having an issue with a .bat that I have written. All it does is tell me which version of a program is installed. But I am trying to remember how to write the FOR statement so that if the program is not installed it show a message and not the error stating the registry entry does not exist. It is a simple FOR statement but I am having issues writing the Else portion of it. All I get with the FOR statements I write with the else do not even work...
Please help.
Below is the Working For statement.
FOR /F "tokens=2* delims= " %%A IN ('REG Query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SnagIt7" /v DisplayVersion') DO Set _Snaginf=%%B
echo . = SnagIt Version %_Snaginf% is installed.
Please help.
Thanks again.