home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odrtime.zip
/
OPENPACK
/
EPM
/
WPSCRED.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1995-11-16
|
2KB
|
67 lines
/* Install Object REXX in the Shell process. */
/* trace ?R */
call RxFuncAdd 'SysLoadFuncs', 'rexxutil', 'SysLoadFuncs'
call SysLoadFuncs
'@echo off'
if SysOS2Ver() < '2.30' then Do
Say "OS/2 Warp is required for Workplace Shell support"
Exit 3
End
/* find the directory with icons etc... */
parse source . . myname .;
n = lastpos('\',myname)
if n = 0 then do
say 'cannot find the base directory ...'
exit 27
end
dir = left(myname,n-1)
parse upper arg 'EXEDIR' '=' bindir .
if bindir = "" then do
n = lastpos('\',dir)
if n = 0 then do
say 'cannot find the EXE directory ...'
exit 23
end
bindir = left(dir,n)
end
if right(bindir,1) <> '\' then bindir = bindir||'\'
dir = dir || '\'
call SysFileTree bindir||'scredrec.exe', 'fls', "FO" /* find the fully specified dir name ... */
if fls.0=0 then do
say 'scredrec.exe not found'
exit 46
end
bindir=left(fls.1,length(fls.1)-length("scredrec.exe"))
/* if SysRegisterObjectClass('SCREDREC',bindir||'SCREDREC.DLL') = 0 then do
say 'SCREDREC registration failed.'
exit 56
end */
params=''
params=params||'ICONFILE='||dir||'scredrec.ico;'
params=params||'EXENAME='||bindir||'scredrec.exe;'
params=params||'PROGTYPE=PM;'
params=params||'STARTUPDIR='||bindir||';'
params=params||'PARAMETERS=;'
params=params||'ASSOCTYPE=OSA Script source,OSA compiled Script,,;'
params=params||'OBJECTID=<SCREDREC>'
Call SysCreateObject 'WPProgram','Script Editor','<WP_DESKTOP>',params,'R'
exit