home *** CD-ROM | disk | FTP | other *** search
- /* ReCreate.CMD - restore lost desktop objects */
- /* by Greg Czaja - July 29, 1992 */
- /* the July 1992 REXXUTIL version is required */
- /* look for REXX20 in Lib 17 */
- Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- Call SysLoadFuncs;
- SysBootDrive=Filespec('Drive',Value('COMSPEC',,'OS2ENVIRONMENT'));
- file_name=SysBootDrive||'\OS2\INI.RC';
- Say "The program will list all standard objects from your desktop"
- Say "Reply Y(es) if you want recreate given object - (E)nd to end the program"
- Say "(N)o is the default if you press ENTER:"
- Do While Lines(file_name) > 0;
- line=Linein(file_name);
- If line='' Then Iterate; /* skip blanks */
- Parse Var line '"PM_InstallObject"' line;
- If line='' Then Iterate; /* skip others */
- Parse Var line '"'head'" 'line; /* get header */
- Parse Var line '"'setup'"' .; /* get setup string */
- Parse Var head title';'object';'location;
- Say title "- Yes/No/End ?";
- Pull reply ;
- If Left(reply,1) ='E' Then Leave;
- If Left(reply,1) <> 'Y' Then Iterate;
- If SysCreateObject(object,title,location,setup,'Update') = 0
- Then Say 'Error creating:' title;
- Else Say title 'created !';
- End;
- rc=Stream(file_name,'C','Close');
- Return 0
- /*
- Did you delete Command Prompts ? Shreded your Shredder ?
- This program restores the standard WPS desktop objects on 2.0.
- It will preserve any current settings/objects you may have created and this
- is its advantage over the Alt-F1 or MAKEINI method.
- You will need the latest REXX fixes (REXX20 available in library 17) to make
- it run correctly.
- */