Question

I am building a custom installer fed from an xml document...

I know most programmers do not build their own anymore but this is specifically what I was assigned so work with me please. The installer will need to uninstall old versions of the program before it can do its job.

I can obtain registry uninstall strings no problem the problem is that the users building the instructions files are not always going to have an exact display name.

So...

I am using Levenshteins difference to obtain possible matches above 70%, this leaves me open to mistakes. To correct them was hoping i could deserialize the the GUID to obtain the name and make sure I had the right one. or somethign along those lines.

Can someone let me know where to look, or any recomendations on how to make a redundant check in the event the likeness is less than 100% based on levenshteins difference (and confirmed with Hamming difference when words/phrases are of equal length)

Note:

Versions may not be know it is a remove all old versions

Publisher will be identical on all

install location should be network but not guarenteed users love to copy locally

Was it helpful?

Solution

GUIDs do not (or at least SHOULDN'T!) contain any information from the domain they were generated from. These are randomly generated numbers, with a keyspace large enough that they are supposedly guaranteed to be unique.

Unless you have a database or some form of repository to search for this GUID's associated information, a bare GUID is no more useful than an integer ID on a random database table. It's only a identifier.

GUIDs

EDIT

I found a VBS script that may do what you are looking for. This will uninstall an application by it's Registry Id. If your program is written in another language, you can still launch VBS scripts using the System.Diagnostics namespace.

System.Diagnostics.Process.Start("path to script here");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top