home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
ii_98158.zip
/
IMGINST.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1997-12-01
|
2KB
|
46 lines
/* Installs Drag & Drop ICON (Note program has Command line interface as well) */
/*--- Work out what directory we are in -------------------------------------*/
parse source . . SourceFileName;
LastSlash = lastpos('\', SourceFileName);
SourceDir = left(SourceFileName, LastSlash - 1);
say 'Creating Icon for code in "' || SourceDir || '" directory...'
/*--- Create Icon -----------------------------------------------------------*/
Title = "Drop Files/Dirs^to^Display .GIF & .JPG^Information^in^Netscape";
Location = "<WP_DESKTOP>";
Class = "WPProgram";
ObjMode = "update";
SetupString = "EXENAME=*;"
SetupString = SetupString || 'PARAMETERS=/c start /PM /MIN CMD.EXE /c ' || SourceDir || '\IMGINFO.CMD *OBJECT_DROPPED* "%**P\%**F";'
SetupString = SetupString || "STARTUPDIR=" || SourceDir || ';'
SetupString = SetupString || "ICONFILE=" || SourceDir || '\ImgInfo.ICO;'
SetupString = SetupString || "MINIMIZED=YES;"
SetupString = SetupString || "PROGTYPE=WINDOWABLEVIO;"
SetupString = SetupString || "OBJECTID=<ImgInfoIcon>;"
call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject';
Rc = SysCreateObject(Class, Title, Location, SetupString, ObjMode);
if Rc = 0 then
say "Failed creating Drag & Drop Icon";
/*--- Create Icon -----------------------------------------------------------*/
Title = "Drop Files/Dirs^to^Display .GIF & .JPG^TREE^Information^in^Netscape";
Location = "<WP_DESKTOP>";
Class = "WPProgram";
ObjMode = "update";
SetupString = "EXENAME=*;"
SetupString = SetupString || 'PARAMETERS=/c start /PM /MIN CMD.EXE /c ' || SourceDir || '\IMGINFO.CMD *OBJECT_DROPPED* "%**P\%**F" /S;'
SetupString = SetupString || "STARTUPDIR=" || SourceDir || ';'
SetupString = SetupString || "ICONFILE=" || SourceDir || '\ImgInfo.ICO;'
SetupString = SetupString || "MINIMIZED=YES;"
SetupString = SetupString || "PROGTYPE=WINDOWABLEVIO;"
SetupString = SetupString || "OBJECTID=<ImgInfoIconTree>;"
call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject';
Rc = SysCreateObject(Class, Title, Location, SetupString, ObjMode);
if Rc = 0 then
say "Failed creating Drag & Drop Icon";
else
say 'Done.';
exit;