Statistiques
| Révision :

root / tmp / org.txm.setups / nsis-2.5 / Include / VB6RunTime.nsh @ 3100

Historique | Voir | Annoter | Télécharger (3,38 ko)

1 2961 mdecorde
/*
2 2961 mdecorde
3 2961 mdecorde
VB6RunTime.nsh
4 2961 mdecorde
5 2961 mdecorde
Setup of Visual Basic 6.0 run-time files, including the Oleaut32.dll security update
6 2961 mdecorde
7 2961 mdecorde
Copyright 2008-2015 Joost Verburg
8 2961 mdecorde
9 2961 mdecorde
To obtain the run-time files, download and extract
10 2961 mdecorde
http://nsis.sourceforge.net/vb6runtime.zip
11 2961 mdecorde
12 2961 mdecorde
Script code for installation:
13 2961 mdecorde
14 2961 mdecorde
!insertmacro InstallVB6RunTime FOLDER ALREADY_INSTALLED
15 2961 mdecorde
16 2961 mdecorde
in which FOLDER is the location of the run-time files and ALREADY_INSTALLED is the
17 2961 mdecorde
name of a variable that is empty when the application is installed for the first time
18 2961 mdecorde
and non-empty otherwise
19 2961 mdecorde
20 2961 mdecorde
Script code for uninstallation:
21 2961 mdecorde
22 2961 mdecorde
!insertmacro UnInstallVB6RunTime
23 2961 mdecorde
24 2961 mdecorde
Remarks:
25 2961 mdecorde
26 2961 mdecorde
* You may have to install additional files for such Visual Basic application to work,
27 2961 mdecorde
  such as OCX files for user interface controls.
28 2961 mdecorde
29 2961 mdecorde
* Installation of the run-time files requires Administrator or Power User privileges.
30 2961 mdecorde
  Use the Multi-User header file to verify whether these privileges are available.
31 2961 mdecorde
32 2961 mdecorde
* Add a Modern UI finish page or another check (see IfRebootFlag in the NSIS Users
33 2961 mdecorde
  Manual) to allow the user to restart the computer when necessary.
34 2961 mdecorde
35 2961 mdecorde
*/
36 2961 mdecorde
37 2961 mdecorde
!ifndef VB6_INCLUDED
38 2961 mdecorde
!define VB6_INCLUDED
39 2961 mdecorde
!verbose push
40 2961 mdecorde
!verbose 3
41 2961 mdecorde
42 2961 mdecorde
!include Library.nsh
43 2961 mdecorde
!include WinVer.nsh
44 2961 mdecorde
45 2961 mdecorde
!macro VB6RunTimeInstall FOLDER ALREADY_INSTALLED
46 2961 mdecorde
47 2961 mdecorde
  !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
48 2961 mdecorde
49 2961 mdecorde
  ;The files below will only be installed on Win9x/NT4
50 2961 mdecorde
51 2961 mdecorde
  !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED    "${FOLDER}\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
52 2961 mdecorde
  !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED    "${FOLDER}\comcat.dll"   "$SYSDIR\comcat.dll"   "$SYSDIR"
53 2961 mdecorde
  !insertmacro InstallLib DLL    "${ALREADY_INSTALLED}" REBOOT_PROTECTED    "${FOLDER}\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
54 2961 mdecorde
  !insertmacro InstallLib TLB    "${ALREADY_INSTALLED}" REBOOT_PROTECTED    "${FOLDER}\stdole2.tlb"  "$SYSDIR\stdole2.tlb"  "$SYSDIR"
55 2961 mdecorde
56 2961 mdecorde
  Push $R0
57 2961 mdecorde
58 2961 mdecorde
  ${if} ${IsNT}
59 2961 mdecorde
    ${if} ${IsWinNT4}
60 2961 mdecorde
      ReadRegStr $R0 HKLM "System\CurrentControlSet\Control" "ProductOptions"
61 2961 mdecorde
      ${if} $R0 == "Terminal Server"
62 2961 mdecorde
        !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4TS\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
63 2961 mdecorde
      ${else}
64 2961 mdecorde
        !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
65 2961 mdecorde
      ${endif}
66 2961 mdecorde
    ${endif}
67 2961 mdecorde
  ${else}
68 2961 mdecorde
    ;No Oleaut32.dll with the security update has been released for Windows 9x.
69 2961 mdecorde
    ;The NT4 version is used because NT4 and Win9x used to share the same 2.40 version
70 2961 mdecorde
    ;and version 2.40.4519.0 is reported to work fine on Win9x.
71 2961 mdecorde
    !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
72 2961 mdecorde
  ${endif}
73 2961 mdecorde
74 2961 mdecorde
  Pop $R0
75 2961 mdecorde
76 2961 mdecorde
!macroend
77 2961 mdecorde
78 2961 mdecorde
!macro VB6RunTimeUnInstall
79 2961 mdecorde
80 2961 mdecorde
   !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
81 2961 mdecorde
   !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
82 2961 mdecorde
   !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
83 2961 mdecorde
   !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll"
84 2961 mdecorde
   !insertmacro UnInstallLib DLL    SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
85 2961 mdecorde
   !insertmacro UnInstallLib TLB    SHARED NOREMOVE "$SYSDIR\stdole2.tlb"
86 2961 mdecorde
87 2961 mdecorde
!macroend
88 2961 mdecorde
89 2961 mdecorde
!verbose pop
90 2961 mdecorde
!endif