These problems are easily fixed with the Windows Installer CleanUp Tool.
Simply install the program, run it from your start menu and it will show you a list of programs. Find the program, by name, that keeps attempting to install, such as "Photogallery." Remove that program with the Installer Cleanup Tool, and your problem is solved.
This will not remove the actual program, just the windows installer information that is causing you problems.
This tool is also very useful at times when you are trying to reinstall a program, such as Microsoft's .NET Framework, and you are getting an error that the program is already installed, but your attempts to first uninstall the progam through add/remove programs are unsuccessful. Remove the program with the Installer Cleanup, and the program can now be reinstalled without the "already installed" error.
Another must in any technician's toolbelt.