home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
weasel09.zip
/
makefolder.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-09-01
|
4KB
|
127 lines
/****************************************************************/
/* Creation of Weasel desktop folder */
/* Based on a script supplied by Antonio Manara Rossini */
/****************************************************************/
/* Register with REXX API extensions. */
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
/* Get creation disposition. */
Call SysCls
Say 'Weasel for OS/2 - Installation Script.'
Say
Say 'Create Weasel for OS/2 folder and icons.'
Say
Say 'NOTE: This program needs to be executed from the installation directory'
Say ' of your working Weasel setup.'
Say
Say 'When object exists object creation should:'
Call CharOut, ' (U=Update, R=Replace, F=Fail) : '
Parse Upper Pull Answer
CreateCollision = 'Fail'
If Left( Answer, 1 ) = R Then CreateCollision = 'Replace'
If Left( Answer, 1 ) = U Then CreateCollision = 'Update'
Say
Call CreateObjects
Exit
CreateObject: procedure
Parse Arg Class, Title, Location, Setup, Collision
Say 'Creating ['Title']'
rc = SysCreateObject( Class, Title, Location, Setup, Collision )
If rc <> 1 Then
Say ' > failed to create ['Title' | 'Class'] at location ['Location']'
return rc
CreateShadow: procedure
Parse Arg Class, Location
Say 'Creating Shadow ['Class']'
rc = SysCreateShadow( Class, Location )
If rc <> 1 Then
Say ' > failed to create ['Class'] at location ['Location']'
return rc
CreateObjects:
current_dir = directory()
previous_dir = left(current_dir, ( length(current_dir) - 4 ))
/***************/
/* MAIN FOLDER */
rc = CreateObject( 'WPFolder',,
'Weasel',,
'<WP_DESKTOP>',,
'NOPRINT=YES;'||,
'DEFAULTVIEW=CONTENTS;'||,
'SELFCLOSE=1;'||,
'ICONVIEW=NONGRID,NORMAL;'||,
'DETAILSVIEW=MINI;'||,
'TREEVIEW=LINES,NORMAL;'||,
'ALWAYSSORT=YES;'||,
'ICONFILE='||current_dir||'\folder.ico;'||,
'OBJECTID=<Weasel_folder>',,
CreateCollision )
/*******************/
/* PROGRAM OBJECTS */
rc = CreateObject( 'WPProgram',,
'Weasel Daemon',,
'<Weasel_folder>',,
'NOPRINT=YES;'||,
'DEFAULTVIEW=RUNNING;'||,
'EXENAME='||current_dir||'\WEASEL.EXE;'||,
'STARTUPDIR='||current_dir||';'||,
'MINIMIZED=YES;'||,
'OBJECTID=<Weasel_Daemon>',,
CreateCollision )
rc = CreateObject( 'WPProgram',,
'Weasel Setup',,
'<Weasel_folder>',,
'NOPRINT=YES;'||,
'DEFAULTVIEW=RUNNING;'||,
'EXENAME='||current_dir||'\SETUP.EXE;'||,
'STARTUPDIR='||current_dir||';'||,
'OBJECTID=<Weasel_Setup>',,
CreateCollision )
rc = CreateObject( 'WPProgram',,
'Weasel PMSetup',,
'<Weasel_folder>',,
'NOPRINT=YES;'||,
'DEFAULTVIEW=RUNNING;'||,
'EXENAME='||current_dir||'\PMSETUP.EXE;'||,
'STARTUPDIR='||current_dir||';'||,
'OBJECTID=<Weasel_PMSetup>',,
CreateCollision )
rc = CreateObject( 'WPProgram',,
'Weasel Manual',,
'<Weasel_folder>',,
'NOPRINT=YES;'||,
'DEFAULTVIEW=RUNNING;'||,
'EXENAME='||'VIEW.EXE;'||,
'PARAMETERS='||current_dir||'\WEASEL.INF;'||,
'STARTUPDIR='||current_dir||';'||,
'MINIMIZED=NO;'||,
'OBJECTID=<Weasel_Manual>',,
CreateCollision )
rc = CreateObject( 'WPShadow',,
'Register',,
'<Weasel_folder>',,
'SHADOWID='||current_dir||'\Register.BMT',,
CreateCollision )
rc = CreateObject( 'WPShadow',,
'Tools',,
'<Weasel_folder>',,
'SHADOWID='||current_dir||'\Tools',,
CreateCollision )
return