home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
simsd2.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-11-30
|
2KB
|
58 lines
/* INSTALL.CMD for Simple Shutdown for OS/2 */
/* Creates a Simple Shutdown object on the OS/2 desktop */
Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
Call SysLoadFuncs;
Signal On Halt Name NOOBJECT
MGExec = "SIMSD.EXE";
/* check for the executable */
MGEDir = Directory() || "\";
MGEFQPN = MGEDir || MGExec;
pdok = Stream(MGEFQPN,"C","QUERY EXISTS");
Do While pdok = "";
LastDrv = Right(SysDriveMap(),2);
Say MGExec "could not be found in" MGEDir || ".";
Say "Enter the drive:directory containing the Simple Shutdown files...";
Say "or just [Enter] for" LastDrv "or [Ctrl+C][Enter] to quit: ";
Parse Pull MGEDir;
MGEDir = Strip(MGEDir,"B");
If MGEDir = "" Then;
MGEDir = LastDrv || "\";
Else Do;
If Right(MGEDir,1) = ":" Then Do;
MGEDir = MGEDir || "\";
End;
Else Do;
If Length(MGEDir) = 1 Then Do;
MGEDir = Translate(MGEDir) || ":\";
End;
Else Do;
If Right(MGEDir,1) <> "\" Then Do;
MGEDir = MGEDir || "\";
End;
End;
End;
End;
MGEFQPN = MGEDir || MGExec;
pdok = Stream(MGEFQPN,"C","QUERY EXISTS");
End;
rc=SysCreateObject("WPProgram","Simple Shutdown","<WP_DESKTOP>",,
"OBJECTID=<SimpleShutdwn2>;"||,
"ICONPOS=50 50;"||,
"EXENAME=" || MGEFQPN || ";"||,
"PARAMETERS= ;"||,
"PROGTYPE=PM;"||,
"STARTUPDIR=" || MGEDir || ";"||,
'', 'R');
Say;
If rc = 1 Then Do;
Say "The Simple Shutdown program object was successfully created!";
Exit 0;
End;
NOOBJECT:
Say "I could not create a Simple Shutdown program object!";
Exit 1;