I’ve found an application which dumps all the registry settings for
installed applications into an .xml file for me (you can find it as
“myuninstall” via google).
I can’t figure out the ruby code I need from REXML to do the following:
-find a particular “product_name” in the xml file
-if found, save off the “uninstall_string” so I can execute it on the
commandline and uninstall the app.
I’m a newbie to Ruby, and I’m even newer to parsing XML with Ruby, so
I’m struggling a bit. It seems there should be a way to navigate within
that “item” after I match on the product name, but I can’t figure out
how. Any guidance would be very VERY appreciated!
Here’s a snippet of the problem xml:
<?xml version="1.0" encoding="ISO-8859-1" ?><installed_app version=“1.0”>
<entry_name>Devicescape</entry_name>
<product_name>DevicescapeDesktop</product_name>
2.0.5
Devicescape
DevicescapeDesktop
No
Yes
<installation_folder>C:\Program
Files\Devicescape\Devicescape</installation_folder>
<web_site>http://www.devicescape.com/</web_site>
<installation_date>1/22/2008 4:42:14 PM</installation_date>
<uninstall_string>MsiExec.exe
/I{C3BFE4FC-C9F6-494F-B3AB-ABD75556DDC5}</uninstall_string>
<quiet_uninstall>No</quiet_uninstall>
<registry_key>{C3BFE4FC-C9F6-494F-B3AB-ABD75556DDC5}</registry_key>
Windows Installer
<root_key>HKEY_LOCAL_MACHINE</root_key>