home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sfx.zip
/
Sample2.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-01-13
|
2KB
|
53 lines
/* This is another sample of a plugin that we use with */
/* the Enhanced E Installation */
/* Feel free to adapt it to your own use */
/*********************************************************/
/* Additional work for the Enhanced E installation */
/* This script is run as the "PostPlugin" at close */
/* and adds a "PlugIns" directory as well as changing */
/* "UnInstal.cmd" to remove it at uninstallation time */
/* and to remove entries made to os2.ini */
/*********************************************************/
parse source . . ThisProgram
crlf = '0d0a'x
ThisDir = Left(ThisProgram, lastpos('\', ThisProgram)-1)
UnInstall = InstDir||'\UnInstal.cmd'
/*********************************************************/
/* Make the "PlugIns" directory and move files to it */
/*********************************************************/
rc = Directory(InstDir)
rc = SysFileTree(InstDir||'\plugins','List','DO')
if List.0 = 0 then rc = SysMkDir('Plugins')
rc = SysFileTree(InstDir||'\plugins\sample.plg','List','FO')
if List.0 = 1 then rc = SysFileDelete(InstDir||'\plugins\sample.plg')
rc = SysMoveObject(InstDir||'\sample.plg',InstDir||'\plugins')
rc = SysFileTree(InstDir||'\plugins\length.plg','List','FO')
if List.0 = 1 then rc = SysFileDelete(InstDir||'\plugins\length.plg')
rc = SysMoveObject(InstDir||'\length.plg',InstDir||'\plugins')
/*********************************************************/
/* Make changes to the "UnInstal.cmd" file */
/*********************************************************/
UnInstValue = CHARIN(UnInstall,1,CHARS(UnInstall))
rc = STREAM(UnInstall,'c','close')
NewInfo1 = "rc = sysini('USER', 'EE', 'Delete:')"||crlf
NewInfo2 = "rc = sysini('USER', 'EEE', 'Delete:')"||crlf
NewInfo = NewInfo1||NewInfo2
Start = POS('/* Other work */', UnInstValue)
UnInstValue = INSERT(NewInfo,UnInstValue,start+20)
rc = SysFileDelete(UnInstall)
rc = CHAROUT(UnInstall,UnInstValue)
rc = STREAM(UnInstall,'c','close')
rc = Directory(ThisDir)
rc = SysFileDelete(InstDir||'\PostPlug.cmd')