Visual Basic 6 Run-Time Files

NSIS

Previous | Contents | Next

B.4 Visual Basic 6 Run-Time Files

A new VB6RunTime.nsh header file is available for the setup of the VB6 run-time files. To obtain the latest run-time files, download vb6runtime.zip and extract this file.

 !include VB6RunTime.nsh

 Var AlreadyInstalled

 Section "-Install VB6 run-time files"

   ;Add code here that sets $AlreadyInstalled to a non-zero value if the application is already installed. For example:
   IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
     StrCpy $AlreadyInstalled 1
   new_installation:

   !insertmacro VB6RunTimeInstall C:\vb6runtimes $AlreadyInstalled ;Replace C:\vb6runtimes with the location of the files

 SectionEnd

 Section "-un.Uninstall VB6 run-time files"

   !insertmacro VB6RunTimeUnInstall

 SectionEnd

Remarks:

  • You may have to install additional files for such Visual Basic application to work, such as OCX files for user interface controls.
  • Installation of the run-time files requires Administrator or Power User privileges. Use the Multi-User header file to verify whether these privileges are available.
  • Add a Modern UI finish page or another check (see IfRebootFlag) to allow the user to restart the computer when necessary.

Previous | Contents | Next