- NSIS Discussion
- update dlls via cab files?
Archive: update dlls via cab files?
treborhudson
25th February 2004 22:00 UTC
update dlls via cab files?
I'm creating an installer that I need to check for a specific window media decoder version. The easiest way to do this is to tell Windows to install the CAB file that contains the latest version of the file and let windows handle the dependencies and registry stuff. Does NSIS support anything like this? I'm told that the windows API has this built in.
Thanks.
Joost Verburg
25th February 2004 22:19 UTC
A CAB file itself does not contain installation information. These things are usually setup using an application or included INF file.
treborhudson
25th February 2004 23:14 UTC
Thanks for the quick reply.
I don't have a good handle on the process then.
Could someone quickly explain the process to go through so NSIS can ensure that the system I'm installing on has or gets installed a newer version of the codec?
I'm guessing here:
Find the .dll or .cab file that needs to be installed.
Check windows version.
(Something with .inf files)
Execute a NSIS command that calls some windows bit of functionality that does the heavy lifting.
Joost Verburg
25th February 2004 23:20 UTC
Microsoft distributes installers for Windows Media Playes codecs. If you don't want to handle the installation yourself you can extract such an installer to a temporary location ($PLUGINSDIR after using InitPlugisDir) and run the installer silently.
treborhudson
27th February 2004 01:20 UTC
OK. I'm using MessageBox MB_YESNO to ask the user if they want to install a new media player version. If they say NO, it jumps past this line (doesn't execute it):
ExecWait "$INSTDIR\upgrades\MPSetup.exe"
However, since I'm calling another installation program, it warns me in the WMP setup that another installation hasn't finished yet and is going to abort.
How can I call another installer while mine is running? OR How can I close my installer but queue up another (possibly 2 other) installer(s) when it finishes?
heXor
27th February 2004 08:01 UTC
There are different solutions to this problem.
The most professional is not to show any message box, but to have a customized page using the InstallOptions plugin.
In a customized page you could have two radiobuttons the user can choose between. Install the codecs or do not install them. Ofcourse that there can be a checkbox too...
Anyway, if you use the MessageaBox, you will have 2 possibilities to start the other installation.
1. From a section in your NSIS script
2. From an installer page, when you leave the page and goto next page for example.
Calling the other installtion should be done as do now, i.e to use the ExecWait command. NSIS installation will wait until "$INSTDIR\upgrades\MPSetup.exe" finishes and then NSIS continues.
I don't really understand if you want to start another instance of the NSIS installation or if you want to call another program, so this you will have to explain more...
Quiting the NSIS installation is easy..just write "Quit" in your NSIS script and the installation will exit...
treborhudson
27th February 2004 16:57 UTC
So is launching a 2nd installer from a messagebox the reason the 2nd installer won't continue?
I only want my 1 instance of the NSIS installer I'm writing, but I need to offer to install the new Windows Media Player (WMP) if they are on Windows 98. (I haven't added the OS check yet, but that seems simple enough)
My main blocker at the moment is that the WMP installer will not run when called from my NSIS installer. It prompts me that another installation is currently active and needs to be shut down before the WMP installer will continue... Press OK to abort. That kind of thing.
Thanks.
Joost Verburg
27th February 2004 18:36 UTC
That is weird. An NSIS installer should not make a difference for the other installer. Does it work when executing it manually using the same parameters?
treborhudson
27th February 2004 18:54 UTC
Yes.
What we are reverting to for this installation is to copy over the WMP executable to the hard drive. Then when our program launches, check for Windows 98 and offer to install WMP from there. When we run the installer at that time, it works just fine.
I'd like to install all necessary things at the same time, but for now, this is an acceptable solution.
I'd be happy to provide more information.
heXor
27th February 2004 19:21 UTC
I also think it's weird...
The other installer should not interfere with NSIS...those two installers have nothing to do with each other.
Anyway, I suggest this:
Create a very simple NSIS installation. You can create a simple NSIS installation by just creating a section and writing the OutFile command. You can take one of the simple examples you find in your NSIS examples folder.
Unpack your exe file (the installer you're trying to run) and then run it with the ExecWait command. If you get the same error, then please post that installation together with the NSIS script file to this forum. The we'll have a look at it.
It's very difficult to know what the problem is.
treborhudson
28th February 2004 01:58 UTC
I won't be able to get back to this until Monday, but I made a test installer and I slightly misread the text and the problem. Here is the exact text:
"Another program installation was not completed. You must restart your computer to complete that installation before upgrading Windows. Click Cancel, restart your computer, and then try installing Windows Media Player 9 Series again."
Options: Next, Cancel
If I click Next, it proceeds to the next installation page where one would presume it normally starts the installation.
So it seems the WMP installer somehow knows that it was called by another installer?
All my install does is copy the executable to the INSTDIR and prompts the user to install it and calls ExecWait to call the .exe file. I can post the file if need be.
Thanks!
heXor
28th February 2004 10:09 UTC
Please post the simple installer.
We'll have al look at it.
Regards
/Paul
heXor
1st March 2004 07:08 UTC
Maybe you can try something else:
Instead of unpacking to the $PLUGINSDIR, try to unpack to c:\ - only for testing purposes, ofcourse.
Try to run the other installer from c:\ and see if you get the same warning message. Maybe it doesn't like to be started from a temp directory...
treborhudson
1st March 2004 18:11 UTC
I posted 3 files here:
http://kuanyin.orcasinc.com/~rob/
The test.nsi is the script. The Test.exe is the result of that script. The MPSetup.exe is the 2nd installer that gets called (and is included in Test.exe).
Thanks for the help!
treborhudson
2nd March 2004 00:06 UTC
Ignore my last few posts... it's the cause of an ID-10-T error.
For some reason my system was in a weird state and after following the instructions of the WMP installer by rebooting, everything is fine. Even launching the WMP installer from within my installer no longer shows the error.
Thanks for the help. Time to slap my forehead now. :|