home *** CD-ROM | disk | FTP | other *** search
- /* This cmd file de-registers the Workplace/2 classes */
- /************************************************************************/
-
- Subdirectories = 'No' /* Set to Yes if want to install into subdirectories */
-
- lll = 0; /* Counter for log file; set to -1 to turn off logging */
- Abort = 'No'; /* Flag to control aborting */
- DeskTop = "C:\DESKTOP";
- TempLate = "C:\DESKTOP\TEMPLATE";
-
- /* Initialize the RexxUtil environment */
-
- Call RxFuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
- Call SysLoadFuncs;
-
- /* Give introductory message */
-
- rc = SayIntro();
- If Abort = 'Yes' then Exit;
-
- /* Register the classes */
-
- rc = DeRegisterClasses();
-
- /* Cleanup Installed Objects */
- rc = CleanUpObjects();
-
- /* Print the Log */
-
- Call PrintLog;
-
- /* Exit */
-
- Exit 0
-
- /***********************************************************************/
- /* Gives the introductory message. */
- /***********************************************************************/
- SayIntro: Procedure Expose Abort DeskTop TempLate;
- Call SysCls;
- Say " "
- Say " This cmd file will allow you to de-register the classes for "
- Say " Ultimedia Workplace/2. It should only be run if you want to "
- Say " remove Workplace/2 from the system. "
- Say " "
- Say " You may stop execution by responding with ENTER to any question. "
- Say " "
- Say " Would you like to proceed with the de-registration (Y/N)?"
- Pull choice .
- If (choice = "") | (choice = "N") then Do;
- Abort = 'Yes'
- Return 2;
- End;
- Say " Please Enter Desktop Location or Use Default("DeskTop")?"
- Pull choice .
- if (choice \= "") then DeskTop = choice;
- Say " Desktop Location to Deinstall from is: "DeskTop
- Say " Please Enter Template Location or Use Default("TempLate"*)?"
- Pull choice .
- if (choice \= "") then TempLate = choice;
- Say " TempLate Location to Deinstall from is: "TempLate
- Return 0
- /***********************************************************************/
- /* Deregister the classes. */
- /***********************************************************************/
- DeRegisterClasses:
-
- /* Replace the WPDataFile Class */
-
- '@REPL WPDataFile WPDataFile anything '
- Call Logit("RegisterClasses: Replace: rc: " rc)
-
- /* De-Register the classes */
-
- rc = SysDeregisterObjectClass("LTFolder");
- Call Logit("DeRegisterClasses: LTFolder: rc: " rc)
-
- rc = SysDeregisterObjectClass("LTQuerySeq");
- Call Logit("DeRegisterClasses: LTQuerySeq: rc: " rc)
-
- rc = SysDeregisterObjectClass("LTDataFile");
- Call Logit("DeRegisterClasses: LTDataFile: rc: " rc)
-
- rc = SysDeregisterObjectClass("SafeFolder");
- Call Logit("DeRegisterClasses: SafeFolder: rc: " rc)
-
- rc = SysDeregisterObjectClass("Clipdata");
- Call Logit("DeRegisterClasses: Clipdata: rc: " rc)
-
- rc = SysDeregisterObjectClass("LTReference");
- Call Logit("DeRegisterClasses: LTReference: rc: " rc)
-
- Return 0
- /***********************************************************************/
- /* CleanUp Installed Objects */
- /***********************************************************************/
- CleanUpObjects: Procedure Expose DeskTop TempLate;
-
- '@DELOBJ "<LT_SAMPLE>"'
- rc = SysFileDelete(DeskTop||'\Clipdata.BMP');
- rc = SysRmDir(DeskTop||'\Safe');
- rc = SysRmDir(TempLate||'\Light_Ta');
- rc = SysRmDir(TempLate||'s\Light Table');
- rc = SysFileDelete(TempLate||'\LT_Quer2\LT_Query');
- rc = SysFileDelete(TempLate||'s\LT Query Sequencer\LT Query');
- rc = SysFileDelete(TempLate||'\LT_Quer2\LT_Quer1');
- rc = SysFileDelete(TempLate||'s\LT Query Sequencer\LT Query Result');
- rc = SysRmDir(TempLate||'\LT_Quer2');
- rc = SysRmDir(TempLate||'s\LT Query Sequencer');
- rc = SysFileDelete(TempLate||'\LT_Query');
- rc = SysFileDelete(TempLate||'s\LT Query');
- rc = SysFileDelete(TempLate||'\LT_Quer1');
- rc = SysFileDelete(TempLate||'s\LT Query Result');
- rc = SysFileDelete(TempLate||'\Clipdata.BMP');
- rc = SysFileDelete(TempLate||'s\Clipdata.BMP');
-
- Return 0
- /***********************************************************************/
- /* Saves a log record into the stem variable log. */
- /***********************************************************************/
- Logit: Procedure Expose lll log.;
- If lll < 0 then Return; /* No logging */
- Parse arg instring
- instring = Strip(instring)
- lll = lll + 1
- log.lll = instring
- Return;
- /***********************************************************************/
- /* Prints the accumulated log entries to target disk, DEREGIST.LOG. */
- /***********************************************************************/
- PrintLog: Procedure Expose lll log.;
- If lll < 0 then Return; /* No logging */
- outname = DEREGIST.LOG
-
- log.0 = lll;
-
- rc = SysFileTree(outname,'lookf','F')
- If lookf.0 <> 0 then Do;
- Say "Erasing an old version of" outname
- "ERASE" outname
- End;
-
- Do i = 1 to log.0 /* write the output file */
- rc = Lineout(outname,log.i);
- /* If rc \= 0 Then Do;
- Say "Write error:" outname
- Return 8
- End; */
- End
- rc = Stream(outname,C,"CLOSE");
-
- Return;
-