home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / instpa.zip / INSTPA.CMD
OS/2 REXX Batch file  |  1993-08-01  |  5KB  |  120 lines

  1. /* INSTPATH.CMD - Change the install path for OS/2 */
  2. /* REXX program to review and modify installation paths   */
  3. /* for OS/2 2.1 GA.                                          */
  4.  
  5. /* This program is needed if you wish to install OS/2 drivers or components */
  6. /* from a drive other than the one used for the initial installation.  This is the */
  7. /* case when you have installed from CID or CDROM and the drive mappings have */
  8. /* changed. */
  9.  
  10. /* Disclaimer: use this software at your own risk.  I have gone */
  11. /* through the INI files on different machines and have determined */
  12. /* these settings are the ones used for reinstallation and driver */
  13. /* installation.  There is no public documentation on these settings */
  14. /* as far as I can tell.  But the good news is that it seems to work! */
  15.  
  16. /* Written by Philip Lieberman */
  17. /* Lieberman and Associates Design and Engineering Group */
  18. /* 221 N. Robertson Blvd. Suite C - Beverly Hills, CA 90211 */
  19. /* Compuserve: 76426,363 - Prodigy: PKFJ82A - IBMLINK: DEV2203 */
  20. /* First release: 7/3/93 */
  21.             
  22.            call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  23.            call sysloadfuncs
  24.  
  25. /* Path to Selective Installation INI file */
  26. /* The rest of the installation stuff is in the OS2.INI file */
  27. INSTALLER='C:\OS2\INSTALL\REINSTAL.INI'
  28.  
  29. Call Syscls
  30.     DO FOREVER
  31.     say 'Change OS/2 2.1 GA Installation path/devices'
  32.     say ' Version 1.0 - by Philip Lieberman'
  33.         say ''
  34.     say 'Options:'
  35.     say '(R)eview current settings'
  36.     say '(C)hange settings'
  37.     say '(E)xit'
  38.     say
  39.     say 'Your selection: (R,C,E):'
  40.     parse upper pull response_menu
  41.     
  42.  if response_menu = 'R' then do 1
  43.     Say '******** Entries in REINSTAL.INI - Used for Selective Install ****'
  44.     Call SysIni INSTALLER, 'All:', 'Apps.'
  45.               if Result \= 'ERROR:' then
  46.                 do i = 1 to Apps.0
  47.                   call SysIni INSTALLER, Apps.i, 'All:', 'Keys'
  48.                   if Result \= 'ERROR:' then
  49.                    do j=1 to Keys.0
  50.                      val = SysIni(INSTALLER, Apps.i, Keys.j)
  51.             if length(val) <= 2 then
  52.                      say left(Apps.i, 20) left(Keys.j, 20) C2X(val)
  53.             else
  54.                      say left(Apps.i, 20) left(Keys.j, 20),
  55.                            'Len=x'''Left(d2x(length(val)),4) left(val, 20)
  56.                    end
  57.                 end
  58.  
  59.     Say ''
  60.     Say '******** Entries in OS2.INI - Used for Printer/Display Install ****'
  61.                   call SysIni 'USER', 'PM_INSTALL', 'All:', 'Keys'
  62.                   if Result \= 'ERROR:' then
  63.                    do j=1 to Keys.0
  64.                      val = SysIni('USER', 'PM_INSTALL', Keys.j)
  65.             if length(val)<=2 then
  66.                      say left('PM_INSTALL', 20) left(Keys.j, 20) C2X(val)
  67.             else
  68.                      say left('PM_INSTALL', 20) left(Keys.j, 20),
  69.                            'Len=x'''Left(d2x(length(val)),4) left(val, 20)
  70.                    end
  71.     Say ''
  72. end
  73.  
  74.  
  75. if response_menu = 'C' then do 1
  76.  
  77.     Say ' Caution: changing the installation path requires that you understand'
  78.     Say '  the structure of the installation disks.  If you are installing from'
  79.     Say '  a network or CDROM, the path is usually: X:\OS2SE21 where X: is'
  80.     Say '  the drive letter and path of the network NET USE drive or the drive '
  81.     Say '  letter and path of the CDROM.'
  82.     Say ''
  83.     Say '  When you select diskette installation, the installation program will'
  84.     Say '  assume that installation will be done exclusively from diskettes in'
  85.     Say '  the A: drive.'
  86.     Say''
  87.     Say ' Do you want to continue? (Y/N)'
  88.     parse upper pull confirm
  89.     if confirm \= 'Y' then EXIT
  90.  
  91.     Say ' Do you want installation from diskette (D) or CDROM/Network (C)'
  92.     parse upper pull response
  93.       if response = 'D' then Do 1
  94.       say 'Now modifying Installation for diskette operation'
  95.               val = SysIni(INSTALLER,'InstallWindow','SOURCEPATH','A:\')
  96.               val = SysIni(INSTALLER,'InstallWindow','FDISKETTESOURCE',X2C('0100'))
  97.  
  98.               val = SysIni('USER','PM_INSTALL','MEDIA','DISKETTE')
  99.               val = SysIni('USER','PM_INSTALL','PDR_DIR','A:\')
  100.       end
  101.     else
  102.       Do 1
  103.       say 'Now modifying Installation for Network/CDROM operation'
  104.       say '   What is the path to use to get to the Network or CDROM?'
  105.       parse upper pull SOURCE_PATH
  106.   
  107.       Say 'Source path for installation/reinstallation will be: 'SOURCE_PATH
  108.           val = SysIni(INSTALLER,'InstallWindow','SOURCEPATH',SOURCE_PATH)
  109.           val = SysIni(INSTALLER,'InstallWindow','FDISKETTESOURCE',X2C('0000'))
  110.  
  111.           val = SysIni('USER','PM_INSTALL','MEDIA','REMOVABLE')
  112.           val = SysIni('USER','PM_INSTALL','PDR_DIR',SOURCE_PATH)
  113.       end
  114.   end
  115.   if response_menu = 'E' then EXIT
  116.  say '---- Press ENTER to continue ----'
  117.  pull pause_step
  118. end
  119.    
  120.