A setup project has a RemovePreviousVersions property that, when set to True, will automatically remove a previous version, as long as it had a different ProductCode and the same UpgradeCode. That won't actually report anything about presence or location to you though. You'd have to have your app write specific data to the registry that you can then check, or else read the Windows Installer data from the registry.