home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
- * *
- * You may modify and compile this file to deinstall *
- * - the desktop class *
- * - the shutdown folder class *
- * - delete the shutdown folder *
- * - delete the WPS WatchCat object *
- * - unregister the WPS WatchCat class *
- * *
- *******************************************************************************/
-
- #define INCL_WINWORKPLACE
- #define INCL_WINSHELLDATA
- #define INCL_DOS
- #include <os2.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
-
- void main()
- {
- HOBJECT object;
-
- setbuf(stdout, 0);
- printf("CleanWPS - uninstall WatchCat\'s WPS objects\n");
- printf("Use this program to: \n");
- printf(" - delete the shutdown folder\n");
- printf(" - deregister the shutdown Folder class\n");
- printf(" - unreplace the WatchCat desktop\n");
- printf(" - deregister WatchCat Desktop class\n");
- printf(" - delete the WatchCat icon from the WPS\n");
- printf(" - deregister the WatchCat class\n");
- printf("Note: You may run this program more than one time.\n\n");
- printf("Do you want to continue? ");
-
- if (tolower(getch())!='y')
- exit(1);
-
- printf("\nDeleting the Shutdown-Folder..........");
- object=WinQueryObject("<WP_SHUTDOWN>");
- if (!object)
- printf("folder not found\n");
- else
- {
- if (WinDestroyObject(object))
- printf("ok\n");
- else
- printf("Cannot delete object\n");
- }
-
- printf("Deregistering Shutdown class .........");
- if (WinDeregisterObjectClass("SDFolder"))
- printf("ok\n");
- else
- printf("error\n");
-
- printf("Unreplacing the Desktop ..............");
- if (WinReplaceObjectClass("WPDesktop", "WCDesk", FALSE))
- printf("ok\n");
- else
- printf("error\n");
-
- printf("Unregistering the extended desktop ...");
- if (WinDeregisterObjectClass("WCDesk"))
- printf("ok\n");
- else
- printf("error\n");
-
- printf("\nDeleting the WatchCat object .........");
- object=WinQueryObject("<WP_CAT>");
- if (!object)
- printf("object not found\n");
- else
- {
- if (WinDestroyObject(object))
- printf("ok\n");
- else
- printf("Cannot delete object\n");
- }
-
- printf("Deregistering the WatchCat class .....");
- if (WinDeregisterObjectClass("WPCat"))
- printf("ok\n");
- else
- printf("error\n");
-
- printf("\n\nDeinstallation completed.\n");
- }
-