home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac_os2 / anidemo.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-03-31  |  2KB  |  68 lines

  1. /* Animouse Demo installation program */
  2.  
  3.   Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'    /* Make REXX functions available */
  4.   Call SysLoadFuncs
  5.  
  6.   Signal On Halt Name ErrorHandler                   /* Error handler */
  7.  
  8.   Call SysCls
  9.   Say
  10.   Say
  11.   Say " Animouse Demo Installation "
  12.   Say " -------------------------- "
  13.  
  14.   Say " Now creating/updating WPS program object . . ."            /* Now create/update the Desktop object*/                                       
  15.  
  16.   Dir = directory()"\"
  17.   SetupString="EXENAME="Dir"ANIMDEMO.EXE;STARTUPDIR="Dir";OBJECTID=<ANIMDEMO>"
  18.   if SysCreateObject("WPFolder", "Animouse Demo", "<WP_DESKTOP>","OBJECTID=<ANIMFOLDER>") Then Do
  19.      FolderString="ICONVIEWPOS=37,40,25,20;BACKGROUND="Dir"folder.bmp,T,,I"
  20.      if SysSetObjectData("<ANIMFOLDER>", FolderString) then
  21.         Say " Folder bitmap successfuly set"
  22.  
  23.      If SysCreateObject("WPProgram", "Animouse Demo", "<ANIMFOLDER>",SetupString, UPDATE) then
  24.        Say " Animouse Demo program object successfully created"
  25.      else
  26.        Say " Could not create program object."
  27.  
  28.      If SysCreateShadow(Dir"readme.txt", "<ANIMFOLDER>") then
  29.        Say " Shadow of readme.txt Successfully created."
  30.      else
  31.        Say " Could not create shadow of readme.txt"
  32.  
  33.      If SysCreateShadow("<ANIMDEMO>", "<WP_START>") then
  34.        Say " Shadow of Animouse Demo successfully placed in startup folder."
  35.      else
  36.        Say " Could not place Animouse Demo in startup folder"
  37.  
  38.  
  39.      if SysOpenObject("<ANIMFOLDER>", 1, 1) then
  40.        Say '  Folder opened successfully!'
  41.  
  42.   End
  43.   else
  44.      Say "Could not create folder on the desktop"
  45.  
  46.     
  47.   
  48.   Say " Now you get to read the README.TXT file . . ."
  49.  
  50.   Command='@E README.TXT'            /* Look at the README.TXT */
  51.   Command
  52.  
  53.   Say
  54.   Say " All Right!  Animouse Demo has been installed successfully!"
  55.  
  56.   Exit
  57.  
  58.  
  59.  
  60. /******* ErrorHandler procedure */
  61.  
  62.   ErrorHandler:
  63.  
  64.     Call SysCls
  65.     Say " EEEEWWWW! Unknown error! - aborting installation . . ."
  66.   Exit
  67.  
  68.