home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / ucbv0100.zip / InstallCBV.Cmd < prev    next >
OS/2 REXX Batch file  |  1995-06-07  |  12KB  |  281 lines

  1. /* Installation Process For The Ultimate Call Back Verifier For AdeptXbbs   */
  2. /* Written And Designed By John Doran - The Nightstalker BBS (212) 486-6281 */
  3.  
  4. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  5. Call SysLoadFuncs
  6.  
  7. Say ''
  8. Say ''
  9. Say ' ───────────────────────────────────────────────────────────────────────────┐ '
  10. Say ' │          The Ultimate Call Back Verifier For AdeptXBBS V0.97Cwb           │ '
  11. Say ' │         Written And Designed By John Doran - The NightStalker BBS         │ '
  12. Say ' │     For Other AdeptXBBS Utilities Try Calling The NightStalker BBS at     │ '
  13. Say ' │                              (212) 486-6281.                              │ '
  14. Say ' └───────────────────────────────────────────────────────────────────────────┘ '
  15.  
  16. CurPath = Directory()
  17.  
  18. GetDrivePath:
  19.  
  20.    Say ''
  21.    Say ''
  22.    Say '  Please Enter The Drive Which AdeptXBBS Is Located:  [ie: "C"]  .'
  23.    Say ''
  24.    Parse Upper Pull EIDrive
  25.    IDrive = SubStr(EIDrive,1,1)
  26.    Say ''
  27.    Say ''
  28.    Say '  Please Enter The Directory Which AdeptXBBS Is Located:  [ie: "Adept"]  .'
  29.    Say  ''
  30.    Parse Upper Pull IPath
  31.    OldPath = CurPath
  32.    Say ''
  33.    Say ''
  34.    Say '     Configuring The Ultimate CallBack Verifier...  Please Wait...'
  35.  
  36.    Address CMD 'Echo Off'
  37.    AdeptDrive = IDrive':'
  38.    AdeptPath = '\'IPath
  39.    CBVPath = AdeptPath'\CallBack'
  40.    AtStart = IDrive':'AdeptPath'\Menus\AtStart.Cmd'
  41.    AtStartBak = IDRive':'AdeptPath'\Menus\AtStart.Cmd.UltiBackUp'
  42.  
  43. CfgNow:
  44.  
  45. CBV = 'The Ultimate CallBack Verifier'
  46. Version = '0.1C Alpha'
  47. CfgFile = 'UltiCBV.Cfg'
  48. CfgBack = 'UltiCBV.Cfg.BackUp'
  49. AdeptSearch = IDrive':\'IPath'\Adept.Exe'
  50. GroupFile = IDrive':\'IPath'\System\Groups'
  51. T = 1
  52.  
  53. FindAdpt = Stream(AdeptSearch,'c','query exists')
  54.  
  55.    If FindAdpt = '' Then
  56.       Do
  57.          Say ''
  58.          Say ''
  59.          Say '  AdeptXBBS Was Not Found On Specified Drive/Path.  Please Try Again!'
  60.          Say ''
  61.          Say ''
  62.          Signal GetDrivePath
  63.       End
  64.  
  65.      Address CMD 'Echo Off'
  66.      Address CMD AdeptDrive
  67.      Address CMD 'CD \'
  68.      Address CMD 'CD 'AdeptPath
  69.  
  70.      SeekFile = IDrive':\'IPath'\CallBack\'CfgFile
  71.  
  72. FindCfg = Stream(SeekFile,'c','query exists')
  73.  
  74.    If FindCfg = '' Then
  75.       Do
  76.          Address CMD 'MD CallBack'
  77.          Address CMD 'CD CallBack'
  78.          Signal InstallFiles
  79.       End
  80.  
  81.    If FindCfg <> '' Then
  82.       Do
  83.          Address CMD 'CD CallBack'
  84.          Address CMD 'Copy UltiCBV.CFG UltiCBV.Temp'
  85.          OldCfg = 'UltiCBV.Temp'
  86.       End
  87.  
  88.  
  89. InstallFiles:
  90.  
  91.    CurPath = Directory()
  92.    Address CMD "Echo Off"
  93.    CopyStr1 = 'Copy 'OldPath'\UltiCBVCfg.Data 'CurPath
  94.    CopyStr2 = 'Copy 'OldPath'\InstallCBV.Cmd 'CurPath
  95.    CopyStr3 = 'Copy 'OldPath'\CBV_Screens.Data 'CurPath
  96.    CopyStr4 = 'Copy 'OldPath'\Utility.Data 'CurPath
  97.    CopyStr5 = 'Copy 'OldPath'\History.Text' CurPath
  98.    CopyStr6 = 'Copy 'OldPath'\Future.Text' CurPath
  99.    CopyStr7 = 'Copy 'OldPath'\File_ID.Diz' CurPath
  100.    CopyStr8 = 'Copy 'OldPath'\Registration.Info' CurPath
  101.    CopyStr9 = 'Copy 'OldPath'\UltiCBV.Doc' CurPath
  102.    DelStr1 = 'Del 'OldPath'\UltiCBVCfg.Data'
  103.    DelStr2 = 'Del 'OldPath'\InstallCBV.Cmd'
  104.    DelStr3 = 'Del 'OldPath'\CBV_Screens.Data'
  105.    DelStr4 = 'Del 'OldPath'\Utility.Data'
  106.    DelStr5 = 'Del 'OldPath'\File_ID.Diz'
  107.    DelStr6 = 'Del 'OldPath'\History.Text'
  108.    DelStr7 = 'Del 'OldPath'\Future.Text'
  109.    DelStr8 = 'Del 'OldPath'\UltiCBV.Doc'
  110.    DelStr9 = 'Del 'OldPath'\Registration.Info'
  111.    DelStr10 = 'Del 'CurPath'\Configure.Cmd > Nul'
  112.    DelStr11 = 'Del 'CurPath'\UltiCBV.CMD > Nul'
  113.    DelStr12 = 'Del 'CurPath'\UltiCBV.Srx > Nul'
  114.    Address CMD CopyStr1
  115.    Address CMD CopyStr2
  116.    Address CMD CopyStr3
  117.    Address CMD CopyStr4
  118.    Address CMD CopyStr5
  119.    Address CMD CopyStr6
  120.    Address CMD CopyStr7
  121.    Address Cmd CopyStr8
  122.    Address Cmd CopyStr9
  123.    Address CMD DelStr1
  124.    Address CMD DelStr2
  125.    Address CMD DelStr3
  126.    Address CMD DelStr4
  127.    Address CMD DelStr5
  128.    Address CMD DelStr6
  129.    Address CMD DelStr7
  130.    Address CMD DelStr8
  131.    Address CMD DelStr9
  132.    Address Cmd DelStr10
  133.    Address Cmd Delstr11
  134.    Address Cmd DelStr12
  135.    Address CMD 'Ren Utility.Data UnZip.Exe'
  136.    Address CMD 'UnZip.Exe -o -q CBV_Screens.Data > Nul'
  137.    MoveStr1 = 'Copy *.A?? 'IDrive':'AdeptPath'\Text > Nul'
  138.    MoveStr2 = 'Del *.A?? > Nul'
  139.    MoveStr3 = 'Del CBV_Screens.Data > Nul'
  140.    Address CMD MoveStr1
  141.    Address CMD MoveStr2
  142.    Address CMD MoveStr3
  143.    Address CMD 'UnZip.Exe -o -q UltiCBVCfg.Data > Nul'
  144.    Address CMD 'Del UltiCBVCfg.Data > Nul'
  145.    Address CMD 'Del UnZip.Exe > Nul'
  146.    MoveStr4 = 'Copy UltiCBV.Help 'IDrive':'AdeptPath
  147.    DelStr13 = 'Del UltiCBV.Help > Nul'
  148.    Address CMD MoveStr4
  149.    Address Cmd DelStr13
  150.  
  151. AutoInstall:
  152.  
  153. Say ''
  154. Say ''
  155. Say ''
  156. Say "   ╒═══════════════════════════════════════════════════════════════════════╕"
  157. Say "   │C│"
  158. Say "   │ Would You Like To AutoInstall The Ultimate CallBack Verifier IntoC│"
  159. Say "   │ AdeptXBBS Set-Up?  If You Choose [Y]es,  Then A REXX Command Will     │"
  160. Say "   │ Be Added To The End Of Your ATSTART.CMD.  A Back Up Of Your Original  │"
  161. Say "   │ AtStart.Cmd Will Be Created For Safety!      [Recommended Setting: Y│"
  162. Say "   ╘═══════════════════════════════════════════════════════════════════════╛"
  163. Say ''
  164. Say ''
  165. Say "CValid Choices Are #'s [Y]es Or [N]o..."
  166.  
  167.    Parse Upper Pull AutoIns
  168.  
  169.    If AutoIns = 'Y' Then
  170.       Signal GetSysOp
  171.  
  172.    If AutoIns = 'N' Then
  173.       Signal AllDone
  174.  
  175.    Signal AutoInstall
  176.  
  177. GetSysop:
  178.  
  179.    Say ' '
  180.    Say ' '
  181.    Say 'CPlease Enter SysOp Name To Send Email Messages To!'
  182.    Say ' '
  183.    Say ' '
  184.    Say '┌──────────────────────────────────────────────────────────────────────────┐'
  185.    Say "│ You Can Specify The Name Of The Person/SysOp Who Is To Recieve AllC│"
  186.    Say "│ E-Mail And Notifications From Callers Using The CallBack Verifier.  This │"
  187.    Say "│ Can Either Be The SysOp, CoSysop, Whomever You Choose.  Please Make Sure │"
  188.    Say "│ To Type The Name Exactly As It Appears In The AdeptXBBS User Records...  │"
  189.    Say "│ Otherwise Email And Notifications Will Not Be Recieved By The Recipient  │"
  190.    Say "│ It Was Meant For.C│"
  191.    Say "└──────────────────────────────────────────────────────────────────────────┘"
  192.    Say " "
  193.    Say "CValid Choices:  Sysop Name,  CoSysop Name"
  194.    Say ''
  195.    Say ''
  196.  
  197.    Parse Pull ToSysop
  198.  
  199.       If ToSysop = '' Then
  200.          Signal GetSysop
  201.  
  202. AutoInstall2:
  203.  
  204.            If Lines(AtStart) > 0 Then
  205.               Do
  206.                  R = LineIn(AtStart)
  207.                    R1 = Space(R,0)
  208.  
  209.                       If R1 = '/*TheUltimateCallBackVerifierByJohnDoran...AutoInstalled*/' Then
  210.                          Do
  211.                             Say "CUltiCBV Routines Already Installed!  Please Delete Them From AtStart.CMD"
  212.                             Say "C First,  Then Run CONFIGURE.CMD And Reconfigure Email Options!!!"
  213.                             Say " "
  214.                             Say "Press [Return] To Continue..."
  215.                             Say ' '
  216.                             Say ' '
  217.  
  218.                                Parse Pull Dummy
  219.  
  220.                             Signal AllDone
  221.                          End
  222.  
  223.                    Signal AutoInstall3
  224.               End
  225.    TS = Translate(ToSysop,'_',' ')
  226.  
  227.    LogIt = LineOut(AtStart,' ')
  228.    LogIt = LineOut(AtStart,'/* ----------====================[*]====================---------- */')
  229.    LogIt = LineOut(AtStart,'/*  The Ultimate CallBack Verifier By John Doran... AutoInstalled  */')
  230.    LogIt = LineOut(AtStart,'/* --------------------------------------------------------------- */')
  231.    LogIt = LineOut(AtStart,'/* Please Do Not Change Or Modify Any Of These Comments!  They Are */')
  232.    LogIt = LineOut(AtStart,'/* Needed By InstallCBV.CMD And The Ultimate CallBack Verifier!!!! */')
  233.    LogIt = LineOut(AtStart,'/* ----------====================[*]====================---------- */')
  234.    LogIt = LineOut(AtStart,' ')
  235.    LogIt = LineOut(AtStart,'ARG line')
  236.    LogIt = LineOut(AtStart,' ')
  237.    LogIt = LineOut(AtStart,'UName = AdeptGetVar(line,1)')
  238.    LogIt = LineOut(AtStart,'UFlag1 = AdeptGetVar(line,44)')
  239.    LogIt = LineOut(AtStart,'Ver = AdeptCheckBit(line,29,UFlag1)')
  240.    LogIt = LineOut(AtStart,' ')
  241.    LogIt = LineOut(AtStart,'   If UName = "'ToSysop'" Then')
  242.    LogIt = LineOut(AtStart,'      Do')
  243.    LogIt = LineOut(AtStart,'         SysAnn = Stream("'IDrive':'AdeptPath'\Text\'TS'.Ans","c","Query Exists")')
  244.    LogIt = LineOut(AtStart,'            If SysAnn <> "" Then')
  245.    LogIt = LineOut(AtStart,'              Do')
  246.    LogIt = LineOut(AtStart,'                 Call AdeptMenuType line,51,"'TS'.Asc"')
  247.    LogIt = LineOut(AtStart,'                 Call AdeptMore line')
  248.    LogIt = lineOut(AtStart,'                 Address CMD "Del Text\'TS'.A*"')
  249.    LogIt = LineOut(AtStart,'              End')
  250.    LogIt = LineOut(AtStart,'        End')
  251.    LogIt = LineOut(AtStart,' ')
  252.    LogIt = LineOut(AtStart,'   If Ver = 0 Then')
  253.    LogIt = LineOut(AtStart,'      Call AdeptChainRexx "'IDrive':'AdeptPath'\CallBack\UltiCBV.ERX",line')
  254.    LogIt = LineOut(AtStart,' ')
  255.    LogIt = LineOut(AtStart,'/* ----------====================[*]====================---------- */')
  256.    LogIt = LineOut(AtStart,' ')
  257.    Logit = LineOut(AtStart,'Exit')
  258.  
  259. AllDone:
  260.  
  261.    Say ' '
  262.    Say ' ┌──────────────────────────────────────────────────────────────────────────┐ '
  263.    Say ' │                                                                          │ '
  264.    Say ' │                                                                          │ '
  265.    Say ' │    Thank You For Using The Ultimate CallBack Verifier For AdeptXBBS.     │ '
  266.    Say ' │                                                                          │ '
  267.    Say ' │                                                                          │ '
  268.    Say ' │    Your Custom Configuration Has Been Saved And Written To Disk.  You    │ '
  269.    Say ' │    Should Now Be Able To Enjoy The Benefits Of Using This Utility.       │ '
  270.    Say ' │                                                                          │ '
  271.    Say ' │                                                                          │ '
  272.    Say ' │    For More REXX Utilities For AdeptXBBS,  Try Calling The NightStalker  │ '
  273.    Say ' │    BBS At (212) 486-6281.                                                │ '
  274.    Say ' │                                                                          │ '
  275.    Say ' ──────────────────────────────────────────────────────────────────────────┘ '
  276.    Say ''
  277.    Say ''
  278.    Say '  Please Run CONFIGURE To Insure Your UltiCBV Configuration Is Correct!'
  279. Exit
  280.  
  281.