home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sfx.zip / Sample.cmd < prev    next >
OS/2 REXX Batch file  |  2000-01-13  |  2KB  |  35 lines

  1. /* Sample Plugin for the SFX Installer */
  2. /*==============================================================
  3. Your plugin files must be written just like a rexx cmd file which
  4. is, in all actuality, what they are. :-) There will be some
  5. VisPro/Rexx commands that you'll be able to use to manipulate the
  6. installer also. We will document some of them in the near future.
  7.  
  8. There is one variable that is important for you to use in these
  9. commands in order to communicate with the installer. The installers
  10. window handle will always be contained in the "window" variable.
  11.  
  12. Tiny example:
  13.  
  14. /* Put up a message box */
  15. response=VpMessageBox(window,'Your TitleBarText','Your message here')
  16.  
  17. Look over the supplied example of a simple messagebox to see how
  18. you can make use of it.
  19. ===============================================================*/
  20.                 /* Get boot_drive, letter and colon then FreeSpace    */
  21. parse upper value VALUE( 'PATH',, 'OS2ENVIRONMENT' ) with ':\OS2\SYSTEM' -1 boot_drive +2
  22. parse value SysDriveInfo(boot_drive) with . FreeSpace . .
  23.  
  24.                 /* Set the titlebar text variable                     */
  25. Title="SFX Installer"
  26.  
  27.                 /* Set the message text variables (msg1 msg2)         */
  28.                 /* '0d0a'x is hex for a carraige return/line feed     */
  29. msg1='This is a sample of a plugin at work'||'0d0a0d0a'x
  30. msg2='Your boot drive is '||boot_drive||' and has '||FreeSpace||' bytes free'
  31.  
  32.                 /* Open the messagebox with the msg's                 */
  33.                 /* concatenated together with "||"                    */
  34. response=VpMessageBox(window,Title,msg1||msg2)
  35.