home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1998 #11 / PCDIREKT_1198.bin / data / system / Swshell / SWSETUP.INF < prev    next >
Encoding:
Text File  |  1996-08-30  |  5.6 KB  |  143 lines

  1. /*
  2.  * - Installation SwShell
  3.  *
  4.  * letzte ─nderung: 96-08-30
  5.  *
  6.  */
  7.  
  8. CreateBackground 'SwShell - Installation'
  9.  
  10. DialogOut 'SwShell - Installation'
  11.  
  12. vInstallDirVon = pwd
  13.  
  14. vLogFileName    = '%__WindowsDirectory__%\\SwShell.log'
  15.  
  16. fp = fopen vLogFileName 'w'                             
  17. If __error__ == 0
  18.     MessageBox 'Logdatei ''%vLogFileName%'' kann nicht ge÷ffnet werden'
  19.     Exit
  20. EndIf
  21.  
  22. Fehler = 0
  23.  
  24. fputs fp '\nInstallation SwShell\n\n'
  25.  
  26. fputs fp 'Datum/Uhrzeit: \t%__Date__%\n'
  27. fputs fp '   WinVersion: \t%__WinVersion__%\n'
  28. fputs fp '     WinMinor: \t%__WinMinor__%\n'
  29. fputs fp '    WinSystem: \t%__WinSystem__%\n'
  30. fputs fp '\n'
  31.  
  32. CopyFile '%vInstallDirVon%\\swshell.dll'  '%__WindowsSystemDirectory__%\\swshell.dll'  fp
  33. If __Error__ != 0
  34.    MessageBox 'Error copy file: SwShell.dll to Windows-System-Directory.\nRestart Windows and start swshell-setup as first.'
  35.    Fehler = 1
  36. EndIf
  37.  
  38. CopyFile '%vInstallDirVon%\\swshellx.exe' '%__WindowsDirectory__%\\swshellx.exe' fp
  39. If __Error__ != 0
  40.    MessageBox 'Error copy file: SwShellX.exe to Windows-Directory.\nRestart Windows and start swshell-setup as first.'
  41.    Fehler = 1
  42. EndIf
  43.  
  44. CopyFile '%vInstallDirVon%\\swshell.hlp'  '%__WindowsDirectory__%\\swshell.hlp'  fp
  45. If __Error__ != 0
  46.    MessageBox 'Error copy file: SwShell.hlp to Windows-Directory.'
  47.    Fehler = 1
  48. EndIf
  49.  
  50.  
  51. SetRegistry 'HKEY_CLASSES_ROOT' '*\\shellex\\ContextMenuHandlers\\SwShell' '' '{0002D503-0000-0000-C000-000000000046}'
  52. If __Error__ != 0
  53.    MessageBox 'Error Set Registry.'
  54.    Fehler = 1
  55. EndIf
  56.  
  57. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Classes\\CLSID\\{0002D503-0000-0000-C000-000000000046}' '' 'Sw Shell Extension'
  58. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Classes\\CLSID\\{0002D503-0000-0000-C000-000000000046}\\InProcServer32' '' 'swshell.dll'
  59. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Classes\\CLSID\\{0002D503-0000-0000-C000-000000000046}\\InProcServer32' 'ThreadingModel' 'Apartment'
  60. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Classes\\Folder\\shellex\\ContextMenuHandlers\\SwShell' '' '{0002D503-0000-0000-C000-000000000046}'
  61.  
  62.  
  63. // --------------- uninstall --------------- //
  64. vUninst = 'Uninstall SwShell'
  65. If __Language__ == 'deu'
  66.    vUninst = 'SwShell entfernen'
  67. EndIf
  68.  
  69. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SwShell' 'DisplayName'     'Sw Shell Extension'
  70. SetRegistry 'HKEY_LOCAL_MACHINE' 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SwShell' 'UninstallString' '%__WindowsDirectory__%\\SwSetupu.exe %__WindowsDirectory__%\\swshell.del'
  71.  
  72. fpDel = fopen '%__WindowsVerzeichnis__%\\swshell.del' 'w'                             
  73. If __error__ == 0
  74.    fputs fp   'Datei ''%vDir%\\swshell.del'' kann nicht ge÷ffnet werden\n'
  75.    MessageBox 'Datei ''%vDir%\\swshell.del'' kann nicht ge÷ffnet werden'
  76.    Fehler = 1
  77. EndIf
  78. vT1 = 'Uninstall SwShell'
  79. vT2 = 'This will remove "SwShell".\\nDo you wish continue ?'
  80. vT3 = 'SwShell removed.'
  81. //vT4 = 'Will you remove the install-tool >SwSetup< ?'
  82. If __Language__ == 'deu'
  83.    vT1 = 'SwShell entfernen'
  84.    vT2 = 'M÷chten Sie tatsΣchlich SwShell entfernen ?'
  85.    vT3 = 'SwShell wurde entfernt !'
  86. //   vT4 = 'Soll auch das Installations-Tool >SwSetup< entfernt werden ?'
  87. EndIf
  88. fputs fpDel 'CreateBackground ''%vT1%''\n'
  89. fputs fpDel 'DialogOut  ''%vT1%''\n'
  90. fputs fpDel 'MessageBox ''%vT2%'' 36\n'
  91. fputs fpDel 'If __error__ == 6\n'
  92.         // swsetupx.exe wird auch von winfilee verwendet !!
  93. fputs fpDel '   vIni = GetIniFile ''%%__WindowsDirectory__%%\\\\Winfile.ini'' ''AddOns'' ''DateiManagerErweiterung''\n'
  94. fputs fpDel '   If vIni == ''''\n'
  95. fputs fpDel '      DeleteFile     ''%%__WindowsDirectory__%%\\\\swshellx.exe''\n'
  96. fputs fpDel '   EndIf\n'
  97. fputs fpDel '   DeleteFile     ''%%__WindowsSystemDirectory__%%\\\\swshell.dll''\n'
  98. fputs fpDel '   DeleteFile     ''%%__WindowsDirectory__%%\\\\swshell.hlp''\n'
  99. fputs fpDel '   DeleteFile     ''%%__WindowsDirectory__%%\\\\swshell.ini''\n'
  100. fputs fpDel '   DeleteFile     ''%%__WindowsDirectory__%%\\\\swshell.del''\n'
  101. fputs fpDel '   DeleteFile     ''%%__WindowsDirectory__%%\\\\swshell.log''\n'
  102.  
  103. fputs fpDel '   DeleteRegistry ''HKEY_CLASSES_ROOT''  ''*\\\\shellex\\\\ContextMenuHandlers\\\\SwShell'' ''''\n'
  104. fputs fpDel '   DeleteRegistry ''HKEY_LOCAL_MACHINE'' ''SOFTWARE\\\\Classes\\\\CLSID\\\\{0002D503-0000-0000-C000-000000000046}'' ''''\n'
  105. fputs fpDel '   DeleteRegistry ''HKEY_LOCAL_MACHINE'' ''SOFTWARE\\\\Classes\\\\Folder\\\\shellex\\\\ContextMenuHandlers\\\\SwShell'' ''''\n' 
  106.  
  107. fputs fpDel '   DeleteRegistry ''HKEY_LOCAL_MACHINE'' ''SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\SwShell'' ''''\n'
  108.  
  109. //fputs fpDel '   MessageBox ''%vT4%'' 36\n'
  110. //fputs fpDel '   If __error__ == 6\n'
  111. //fputs fpDel '      MoveFileByStartup ''%%__WindowsDirectory__%%\\\\swsetupu.exe'' ''NUL''\n'
  112. //fputs fpDel '      MoveFileByStartup ''%%__WindowsDirectory__%%\\\\swstdf32.dll'' ''NUL''\n'
  113. //fputs fpDel '   EndIf\n'
  114.  
  115. fputs fpDel '   MessageBox ''%vT3%''\n'
  116. fputs fpDel 'EndIf\n'
  117. fclose fpDel
  118. // ------------ 
  119.  
  120.  
  121. fputs fp '\nEnde\n'
  122.  
  123. fclose fp
  124.  
  125. If Fehler != 0
  126.    vText = '\r\nError by installation, will you see the installation-log ?'
  127.    If __Language__ == 'deu'
  128.       vText = '\r\nBei der Installation ist ein Fehler aufgetreten,\r\nsoll die Installations-Logdatei angezeigt werden ?'
  129.    EndIf
  130.    MessageBox vText 36
  131.    If __error__ == 6
  132.     Exec 'notepad %vLogFileName%'
  133.    EndIf
  134. Endif
  135.  
  136. If Fehler == 0
  137. vText = 'Setup is complete.  You may run the Explorer.'
  138.    If __Language__ == 'deu'
  139.       vText = 'Die Installation ist Ok, Sie k÷nnen nun den Arbeitsplatz/Explorer ÷ffnen.'
  140.    Endif
  141.    MessageBox vText
  142. EndIf
  143.