home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 2.4 / 1996-05_-_Disc_2.4.bin / setup / uninst.inf < prev   
INI File  |  1996-01-16  |  6KB  |  196 lines

  1. DefineVariables
  2.     Text            [ProductName]           := Allied General DEMO
  3.     Text            [ItemName]              := Allied General DEMO
  4.     Text            [MainExeName]           := AGDEMO.EXE
  5.     Text            [ProductIniFile]        := AG.INI
  6.     Text            [ProgGrpName]           := Allied General DEMO
  7.     Text            [ProgGrpFileName]       := ALLIEDDE.GRP
  8.     Text            [Language]              := English
  9.     Number          [Continue]              := 1011
  10.  
  11.     Text            [AreYouSureText]        := Are you sure you wish to completely remove the selected application and all it's components?
  12.     Text        [ReadyToDeleteText]    := Ready to delete all files in
  13.     Text            [YES_text]              := Yes
  14.     Text            [NO_text]               := No
  15.     Text            [DelteingFilesText]     := Please wait...
  16.     Text            [UninstallText]         := Uninstall
  17.     Logical            [IsWinNT]                 := N
  18.     Logical         [IsWin95]               := N
  19. EndDefineVariables
  20.  
  21. SetDefaultBitmap Off
  22. SetInstallModeTo Install
  23. SetTraceMode Off
  24. SetExitConfirmationPrompt off
  25. SetPopupBorderTo double
  26. SetReplacementInquiry Off
  27.  
  28. Do CheckIfWindows95
  29. Do SetInstallDir
  30. Do GetLanguageIndex
  31. Do SetLanguage
  32. SetTopLineTo [ProductName] [UninstallText]
  33. ShowWindow Maximize
  34. Do CheckIfSure
  35. SoLong Quietly
  36.  
  37. Procedure CheckIfWindows95
  38.       If WIN32
  39.      If WindowsVersion >= 3.95
  40.        [IsWin95] := Y
  41.      Else
  42.        [IsWinNT] := Y  ;; Windows NT
  43.      Endif
  44.       Else
  45.      [IsWin95] := N    ;; Win 3.1
  46.       EndIf
  47. EndProcedure
  48.  
  49. Procedure SetInstallDir
  50.     [Number1] := LengthOf [InstallFromDirectory]
  51.         DecrementNumber [Number1]
  52.     [String1] := SubstringOf [InstallFromDirectory] from Beginning to [Number1]
  53.     [InstallationDirectory] := [String1]
  54.  
  55. EndProcedure
  56.  
  57. Procedure UNINSTALL
  58.         If DirectoryExists [InstallationDirectory]
  59.             TextBox BlackOnLightGray
  60.             [DelteingFilesText]
  61.             EndTextBox
  62.             If DirectoryExists [InstallationDirectory]\DATA
  63.               DeleteFiles from [InstallationDirectory]\DATA
  64.                 *.*
  65.               EndDeleteFiles
  66.               DeleteDirectory [InstallationDirectory]\DATA
  67.             EndIf
  68.  
  69.             If DirectoryExists [InstallationDirectory]\ART
  70.               DeleteFiles from [InstallationDirectory]\ART
  71.                 *.*
  72.               EndDeleteFiles
  73.               DeleteDirectory [InstallationDirectory]\ART
  74.             EndIf
  75.             If DirectoryExists [InstallationDirectory]\SCENARIO
  76.               DeleteFiles from [InstallationDirectory]\SCENARIO
  77.                 *.*
  78.               EndDeleteFiles
  79.               DeleteDirectory [InstallationDirectory]\SCENARIO
  80.             EndIf
  81.             If [IsWin95]
  82.               Run [InstallationDirectory]\REGISTRY.EXE [InstallationDirectory]\UAG.RGS
  83.             EndIf
  84.             DeleteFiles from [InstallationDirectory]
  85.                 *.*
  86.             EndDeleteFiles
  87.             DeleteDirectory [InstallationDirectory]
  88.  
  89.             If [IsWin95]
  90.                 [String1] := [WindowsDirectory]\Start Menu\Programs\[ProductName]
  91.                 LFNGetShortPathName [String1] [String2]
  92.                 If [String2] <> BlankString
  93.                     ProgramManagerDDE
  94.                         ShowGroup([ProgGrpName],2)
  95.                         DeleteItem([ProgGrpName])
  96.                            DeleteGroup([ProgGrpName])
  97.                     EndProgramManagerDDE
  98.                   EndIf
  99.             Else
  100.               If FileExists [WindowsDirectory]\[ProgGrpFileName]
  101.                 ProgramManagerDDE
  102.                   DeleteGroup([ProgGrpName])
  103.                 EndProgramManagerDDE
  104.                EndIf
  105.                If [IsWinNT]
  106.                 ProgramManagerDDE
  107.                   DeleteGroup([ProgGrpName])
  108.                 EndProgramManagerDDE
  109.                EndIf
  110.             EndIf
  111.         EndIf
  112. EndProcedure
  113.  
  114. Procedure CheckIfSure
  115.   DialogBox 200 60 UseHeader "Allied General DEMO   " Returns [Continue] BlackOnLightGray ModalFrame
  116.     CText @xy(0,10) 200 70 [AreYouSureText]
  117.     DefPushButton @xy( 30, 35) 40 16 [YES_text] 1012
  118.     PushButton @xy(125, 35) 40 16 [NO_text] 1011
  119.   EndDialogBox
  120.  
  121.  ClearScreen
  122.  
  123.  If [Continue] = 1012
  124.  GoTo Uninst
  125.   DialogBox 200 60 UseHeader "Allied General DEMO   " Returns [Continue] BlackOnLightGray ModalFrame
  126.     CText @xy(0,10) 200 70 [ReadyToDeleteText]
  127.     DefPushButton @xy( 30, 35) 40 16 [YES_text] 1015
  128.     PushButton @xy(125, 35) 40 16 [NO_text] 1016
  129.   EndDialogBox
  130.  Else
  131.   SoLong
  132.  EndIf
  133.  
  134.  ClearScreen
  135.  
  136.  if [Continue] = 1015
  137.  :Uninst
  138.   Do UNINSTALL
  139.  Else
  140.   SoLong
  141.  EndIf
  142. EndProcedure
  143.  
  144. Procedure GetLanguageIndex
  145.  
  146.  If FileExists [InstallFromDirectory]\AUTOHD.INI
  147.     ClearArray [Array1]
  148.     [Array1][1] := Language
  149.     [Array1][2] := which
  150.     [Array1][3] := English
  151.     [Array1][4] := [InstallFromDirectory]\AUTOHD.INI
  152.  
  153.     GetPrivateProfileString Using [Array1]
  154.     [Language] := [Array1][5]
  155.   EndIf
  156. EndProcedure
  157.  
  158. Procedure SetLanguage
  159.     If [Language] = English
  160.       [ReadyToDeleteText] := Ready to delete all files in [InstallationDirectory].
  161.     EndIf
  162.     If [Language] = French
  163.       [DelteingFilesText] := Veuillez patienter...
  164.       [AreYouSureText]    := Voulez-vous supprimer dΘfinitivement l'application sΘlectionnΘe et tous ses composants ?
  165.       [ReadyToDeleteText] := PrΩt α effacer tous les fichiers dans [InstallationDirectory].
  166.       [YES_text]          := Oui
  167.       [NO_text]           := Non
  168.       [UninstallText]     := DΘsinstaller
  169.     EndIf
  170.     If [Language] = German
  171.       [DelteingFilesText] := Bitte warten...
  172.       [ReadyToDeleteText] := Bereit, um alle Dateien in [InstallationDirectory] zu l÷schen.
  173.       [AreYouSureText]    := Sind Sie sicher, da▀ Sie die gewΣhlte Anwendung und ihre ganzen Komponenten vollstΣndig entfernen wollen?
  174.       [YES_text]          := Ja
  175.       [NO_text]           := Nein
  176.       [UninstallText]     := Entfernen
  177.     EndIf
  178.     If [Language] = Spanish
  179.       [DelteingFilesText] := Espere, por favor...
  180.       [ReadyToDeleteText] := Listo para borrar todos los ficheros en [InstallationDirectory].
  181.       [AreYouSureText]    := ┐Estß seguro de querer eliminar la aplicaci≤n seleccionada  y todos sus componentes?
  182.       [YES_text]          := Sφ
  183.       [NO_text]           := No
  184.       [UninstallText]     := Desinstalar
  185.     EndIf
  186.     If [Language] = Italian
  187.       [DelteingFilesText] := Attendere...
  188.       [ReadyToDeleteText] := Pronto a cancellare tutti i file in [InstallationDirectory].
  189.       [AreYouSureText]    := Si desidera eliminare completamente l'applicazione selezionata e tutti i suoi componenti?
  190.       [YES_text]          := S∞
  191.       [NO_text]           := No
  192.       [UninstallText]     := Disinstalla
  193.     EndIf
  194. EndProcedure
  195. EndScript
  196.