home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / stwtv113.zip / Install.CMD < prev    next >
OS/2 REXX Batch file  |  1999-11-13  |  2KB  |  63 lines

  1. /* ReXX Utility To Install StWTV */
  2. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  3. call SysLoadFuncs
  4.  
  5. /* Get current directory */
  6. CDir=Directory()
  7.  
  8. /* Get location of StWTV.INI */
  9. IniLoc=SysIni('USER','StM Applications','StWTV.INI')
  10. If IniLoc="ERROR:" Then
  11. Do
  12.  IniLoc=CDir'\StWTV.INI'
  13.  Call SysIni 'USER',"StM Applications","StWTV.INI",IniLoc
  14. End
  15. /* Prompt user and ask for language */
  16. Say "This will install StWTV on your system"
  17. Say "Please enter language code."
  18. Say "DE for german"
  19. Say "EN for english"
  20. Say "REMOVE for deinstallation"
  21. Say "All other codes will default to english"
  22. parse pull Lang
  23. if Length(Lang)>1 Then
  24. Do
  25.  if Lang='REMOVE' Then
  26.  Do
  27.   Lang=''
  28.   I=SysIni('USER','StM Applications','StWTV.INI','DELETE:')
  29.   I=SysIni('USER','StM Applications','StWTVLanguage','DELETE:')
  30.   Say "The entry in OS2.INI was removed"
  31.   Exit
  32.  End
  33. End
  34. if Length(Lang)>1 Then
  35. Do
  36.  Say "Please enter name of your TV-Card (default: 'wcast')"
  37.  parse pull CardName
  38.  If Length(CardName)<1 Then
  39.  Do
  40.   CardName='wcast'
  41.  End
  42.  Say "Enter number of card (default: '1')"
  43.  parse pull CardNumber
  44.  If Length(CardNumber)<1 Then
  45.  Do
  46.   CardNumber=1
  47.  End
  48.  C='0'CardNumber*1000000
  49.  C=X2C(C)
  50.  Call SysIni IniLoc,"CardConfiguration","DeviceName",CardName
  51.  Call SysIni IniLoc,"CardConfiguration","CardNumber",C
  52.  Call SysIni IniLoc,"CardConfiguration","Connector",X2C('02000000')
  53.  Call SysIni 'USER',"StM Applications","StWTVLanguage",Lang
  54.  'If Exist 'CDir'\StWTV*.HLP DEL 'CDir'\StWTV*.HLP'
  55.  'Call StWTV /RUNSIC:Script\Install.STS'
  56.  Call SysCls
  57.  Say "The programm was successfully installed."
  58. End
  59. If Length(Lang)<1 Then
  60. Do
  61.  'view StWTV_EN.INF Installation'
  62. End
  63.