- NSIS Discussion
- VB Runtimes
Archive: VB Runtimes
HelluvaEngineer
25th July 2002 21:57 UTC
VB Runtimes
I'm trying to figure out the most seamless way to integrate the VB runtimes into my installation.
I set it up so that it would launch the Microsoft installer using the "ExecWait /Q" option. That worked, but on machines that actually needed the update, it prompted to reboot. Even if I did this last, I would still prefer that the user not reboot in the middle of an installation. Perhaps I could wait till the end and just use "Exec", but then I can't clean up the temp file I extracted.
What are my other options? Bundle the individual .DLLs and check versions on each to decide whether I should upgrade? I had even thought of creating a download link and launching that if the user needs the upgrade (thereby shrinking the install by 1 MB).
Any advice? Thanks.
DuaneJeffers
26th July 2002 09:05 UTC
Very Simple .... At the End of the install of your program, run the vbRuntimes installer. Have it something like (IF the installer is autoclose) running a pop saying the user needs to update and once the user clicks ok, then the installer for your program quits and launches the installer for the vbRuntimes. This is usually what games do for the upgrade of DirectX or OpenGL.
-Duane
HelluvaEngineer
26th July 2002 15:10 UTC
Ok, I'm down with that plan. However, I see one glitch. How do I clean up the M$ executable, since the installer will have already exited? I would prefer to not leave ~1MB of junk in the $TEMP directory, unless there's no other way.
EDIT: I just realized this won't work. I need to launch a VB app (an Audio Setup Wizard) before or immediately after the installer. It has a dependency on the VB runtimes. So, this would require launching the runtime installer first and THEN run the wizard.
Joost Verburg
26th July 2002 15:33 UTC
You can also extract the VB runtimes from the file and install them using NSIS (with the UpgradeDLL macro).
HelluvaEngineer
26th July 2002 19:04 UTC
I guess that's what I need to do, then. Do I need to bother with any of that Shared DLL registry stuff?
Joost Verburg
26th July 2002 21:11 UTC
Yes, you should use the UpgradeDLL macro for upgrading the VB DLL's.
By-Gones
8th August 2002 01:00 UTC
I had the same vb-runtime-problem. Here's my solution:
For the completly silent install of the vbrun60sp5.exe, you need the command line option /Q /R:N for the microsoft file so there is never a restart:
ExecWait "$INSTDIR\VBRUN60SP5.EXE /Q /R:N"
After that, you can clean the temporary file.
Then, at the end of the installation, you call something like this:
MessageBox MB_YESNO|MB_ICONQUESTION "Do you want to restart Windows?" IDNO NoRestart
Reboot
NoRestart:
...
You also can call this in the .onInstSuccess - function, so it's really at the end.
Tscherno
30th August 2002 06:33 UTC
Re: VB Runtimes
Originally posted by HelluvaEngineer
I had even thought of creating a download link and launching that if the user needs the upgrade (thereby shrinking the install by 1 MB).
This sounds very interesting. How could it be done?
kichik
30th August 2002 09:36 UTC
Either use ExecShell "open" "http://www.whatever.com/downloadthis.exe" or just use NSIS-dl.
Tscherno
30th August 2002 11:47 UTC
And how can I check if a specific version of the vb-runtime is installed?
kichik
30th August 2002 11:53 UTC
Using GetDLLVersion or Sunjammer's SysDLL