home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / ii_98158.zip / IMGINST.CMD < prev   
OS/2 REXX Batch file  |  1997-12-01  |  2KB  |  46 lines

  1. /* Installs Drag & Drop ICON (Note program has Command line interface as well) */
  2.  
  3. /*--- Work out what directory we are in -------------------------------------*/
  4. parse source . . SourceFileName;
  5. LastSlash = lastpos('\', SourceFileName);
  6. SourceDir = left(SourceFileName, LastSlash - 1);
  7. say 'Creating Icon for code in "' || SourceDir || '" directory...'
  8.  
  9. /*--- Create Icon -----------------------------------------------------------*/
  10. Title       = "Drop Files/Dirs^to^Display .GIF & .JPG^Information^in^Netscape";
  11. Location    = "<WP_DESKTOP>";
  12. Class       = "WPProgram";
  13. ObjMode     = "update";
  14. SetupString = "EXENAME=*;"
  15. SetupString =  SetupString || 'PARAMETERS=/c start /PM /MIN CMD.EXE /c ' || SourceDir || '\IMGINFO.CMD *OBJECT_DROPPED* "%**P\%**F";'
  16. SetupString =  SetupString || "STARTUPDIR=" || SourceDir || ';'
  17. SetupString =  SetupString || "ICONFILE="   || SourceDir || '\ImgInfo.ICO;'
  18. SetupString =  SetupString || "MINIMIZED=YES;"
  19. SetupString =  SetupString || "PROGTYPE=WINDOWABLEVIO;"
  20. SetupString =  SetupString || "OBJECTID=<ImgInfoIcon>;"
  21. call RxFuncAdd  'SysCreateObject', 'RexxUtil', 'SysCreateObject';
  22. Rc = SysCreateObject(Class, Title, Location, SetupString, ObjMode);
  23. if Rc = 0 then
  24.    say "Failed creating Drag & Drop Icon";
  25.  
  26. /*--- Create Icon -----------------------------------------------------------*/
  27. Title       = "Drop Files/Dirs^to^Display .GIF & .JPG^TREE^Information^in^Netscape";
  28. Location    = "<WP_DESKTOP>";
  29. Class       = "WPProgram";
  30. ObjMode     = "update";
  31. SetupString = "EXENAME=*;"
  32. SetupString =  SetupString || 'PARAMETERS=/c start /PM /MIN CMD.EXE /c ' || SourceDir || '\IMGINFO.CMD *OBJECT_DROPPED* "%**P\%**F" /S;'
  33. SetupString =  SetupString || "STARTUPDIR=" || SourceDir || ';'
  34. SetupString =  SetupString || "ICONFILE="   || SourceDir || '\ImgInfo.ICO;'
  35. SetupString =  SetupString || "MINIMIZED=YES;"
  36. SetupString =  SetupString || "PROGTYPE=WINDOWABLEVIO;"
  37. SetupString =  SetupString || "OBJECTID=<ImgInfoIconTree>;"
  38. call RxFuncAdd  'SysCreateObject', 'RexxUtil', 'SysCreateObject';
  39. Rc = SysCreateObject(Class, Title, Location, SetupString, ObjMode);
  40. if Rc = 0 then
  41.    say "Failed creating Drag & Drop Icon";
  42. else
  43.    say 'Done.';
  44. exit;
  45.  
  46.