home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / pig_14.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1995-10-09  |  2KB  |  71 lines

  1. /**********************************************************************
  2.  *
  3.  * Personal Inventory Gatherer/2 installation program.
  4.  *
  5.  * Vesion 1.4
  6.  * October 9, 1995
  7.  *
  8.  * Copyright (C) 1994-1995 by
  9.  * James E Johnson Jr.
  10.  * All Rights Reserved.
  11.  *
  12.  **********************************************************************/
  13.  
  14.  
  15. "@ECHO OFF"
  16.  
  17. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  18. call SysLoadFuncs
  19. call RxFuncAdd "SysCls", "RexxUtil", "SysCls"
  20.  
  21. arg FullPathName
  22.  
  23. if FullPathName = "" then
  24.   do
  25.     call SysCls
  26.     say ""
  27.     say "Usage:"
  28.     say " "
  29.     say "  INSTALL FullPathName"
  30.     say ""
  31.     say "  FullPathname is a combination of both the drive letter and directory path,"
  32.     say "  if the directory does not exist it will be created."
  33.     say ""
  34.     say ""
  35.     say "  Example:"
  36.     say ""
  37.     say "  INSTALL c:\apps\pig                   -- will install PIG/2 in c:\apps\pig"
  38.   end
  39. else
  40.   do
  41.     call SysCls
  42.     say "Installing Personal Inventory Gatherer/2 in "FullPathName"."
  43.     rc = SysFileTree( FullPathName, "dirs", "D")
  44.     if (dirs.0 = 0) then
  45.       do
  46.         rc = SysMkDir(FullPathName)
  47.         if (rc \= 0) then
  48.           do
  49.             say "Couldn't create directory "FullPathName"."
  50.           exit
  51.         end
  52.       end
  53.     copy pig.exe      FullPathName ">NUL"
  54.     copy pig.hlp      FullPathName ">NUL"
  55.     copy pig.doc      FullPathName ">NUL"
  56.     copy readme.now   FullPathName ">NUL"
  57.     copy pig2_upd.exe FullPathName ">NUL"
  58.     copy install.cmd  FullPathName ">NUL"
  59.     rc = SysFileTree( "pig.key", "files", "F")
  60.     if (files.0 \= 0) then
  61.       do
  62.         copy pig.key FullPathName ">NUL"
  63.       end
  64.     CR = D2C(13)
  65.     rc = SysCreateObject("WPProgram", "Personal"CR" Inventory"CR" Gatherer/2", "<WP_DESKTOP>", "PROGTYPE=PM;EXENAME="FullPathname"\pig.exe", "REPLACE")
  66.     say "Installation complete."
  67.     say " "
  68.     say "Remember to take a look at Readme.NOW"
  69.   end
  70.  
  71.