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