Reputation: 267
In basic MSI project, I add a property "id" in Installation Designer table,set its default value is 50, when I install the service, I set a new value 48 to this property, and use MsiGetProperty(hMSI, "id", ID, nvSize) to get new value, it works fine. but when I unintall the service, use MsiGetProperty(hMSI, "id", ID, nvSize) once more, I only get the default value 50 instead of new value 48.Why?
How can i get the new value during uninstallation?
Upvotes: 0
Views: 197
Reputation: 708
Because during installation you modify this property only for this instance of installation. It means, when you launch uninstallation - property will have default (initial) value.
The one way to solve this issue - create Registry entry with actual value of id (HKLM\Software\MySoftware\id=48
for example) and during uninstallation just read it with help of SystemSearch to property id.
Upvotes: 1