I'm creating a setup script for a program developed by someone else. Their installer won't install over an existing version, so I need to uninstall any previous installations.
The uninstaller is named unins$num.exe, where the $num is a number that seems to increment each time the program is installed, (e.g. unins000.exe, unins001.exe, unins002.exe).
I'm using a MS-DOS batch script at the moment, as other people in my department would have a chance of maintaining it, but if it is much easier in some other language, I'm open to change. The only requirement is that I can't install an interpreter first, so it must be built in to Windows.
My target platforms are Windows XP and Windows 7. Windows Vista support is nice, but not required.
How can I use a wildcard to start the program, so I don't need to list 1000 possible exe's?