Windows: remove trailing whitespace
[openafs.git] / src / WINNT / install / wix / uninstall / uninstall.c
1 #define _WIN32_MSI 200
2 #include <windows.h>
3 #include <msi.h>
4
5 #define OAFW_UPGRADE_CODE TEXT("{6823EEDD-84FC-4204-ABB3-A80D25779833}")
6 int main(void)
7 {
8     UINT rc = ERROR_SUCCESS;
9     DWORD iProduct = 0;
10     CHAR  szProductCode[39];
11
12     MsiSetInternalUI(INSTALLUILEVEL_PROGRESSONLY, NULL);
13
14     do {
15         rc = MsiEnumRelatedProducts(OAFW_UPGRADE_CODE, 0, iProduct, szProductCode);
16         if ( rc == ERROR_SUCCESS ) {
17             MsiConfigureProduct(szProductCode, 0 /* ignored */, INSTALLSTATE_ABSENT);
18             iProduct++;
19         }
20     } while ( rc == ERROR_SUCCESS );
21
22     return (rc == ERROR_NO_MORE_ITEMS ? 0 : 1);
23 }