home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / wps / tools / recreate / recrea.cmd
Encoding:
Text File  |  1992-08-16  |  1.6 KB  |  38 lines

  1. /* ReCreate.CMD - restore lost desktop objects   */
  2. /* by Greg Czaja - July 29, 1992                 */
  3. /* the July 1992 REXXUTIL version is required    */
  4. /* look for REXX20 in Lib 17                     */
  5. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  6. Call SysLoadFuncs;
  7. SysBootDrive=Filespec('Drive',Value('COMSPEC',,'OS2ENVIRONMENT'));
  8. file_name=SysBootDrive||'\OS2\INI.RC';
  9. Say "The program will list all standard objects from your desktop"
  10. Say "Reply Y(es) if you want recreate given object - (E)nd to end the program"
  11. Say "(N)o is the default if you press ENTER:"
  12. Do While Lines(file_name) > 0;
  13. line=Linein(file_name);
  14. If line='' Then Iterate;        /* skip blanks   */
  15. Parse Var line '"PM_InstallObject"' line;
  16. If line='' Then Iterate;        /* skip others   */
  17. Parse Var line '"'head'" 'line; /* get header    */
  18. Parse Var line '"'setup'"' .;   /* get setup string */
  19. Parse Var head title';'object';'location;
  20. Say title "- Yes/No/End ?";
  21. Pull reply ; 
  22. If Left(reply,1) ='E' Then Leave;
  23. If Left(reply,1) <> 'Y' Then Iterate;
  24. If SysCreateObject(object,title,location,setup,'Update') = 0
  25.    Then Say 'Error creating:' title;
  26.    Else Say title 'created !';
  27. End;
  28. rc=Stream(file_name,'C','Close');
  29. Return 0
  30. /*
  31. Did you delete Command Prompts ? Shreded your Shredder ?
  32. This program restores the standard WPS desktop objects on 2.0.
  33. It will preserve any current settings/objects you may have created and this
  34. is its advantage over the Alt-F1 or MAKEINI method.
  35. You will need the latest REXX fixes (REXX20 available in library 17) to make
  36. it run correctly.
  37. */
  38.