janedoe2003
18th December 2003 21:36 UTC
Using NSIS to reinstall missing dependencies when starting up?
Hi,
I went through the tutorial and FAQ on NSIS' site, and read the few threads here that dealt with VB... but I didn't find what I'm looking for, namely how to check that all the app's OCX's are still there when running Main(), and fetch and reinstall them from the Net if any dependency has been replaced by a different version since the original install.
Based on documents I read here and there, DependencyWalker's help file among them, checking an EXE's dependencies is error-prone, but at the very least, I'd like to write a routine that goes through the usual suspects in Main() before going any further.
How do you VB guys handle this issue, to avoid the dreaded Errs 429 or (God forbid) 50003?
Thank you
JD.
Joost Verburg
18th December 2003 21:40 UTC
The UpgradeDLL macro only installs the files if an older version is currently installed.
kichik
18th December 2003 21:44 UTC
As for the dependency check, I think you'd better ask this in a VB forum instead of here. NSIS is not an installer just for VB so you might find the answer faster in a VB oriented forum.
As for downloading and installing a new version, you can do that using the NSISdl plug-in (see Contrib\NSISdl) and the UpgradeDLL macro (see docs). You'd also probably need to process the command line a bit using $CMDLINE and some functions that are available in the Archive for this purpose.
Joost Verburg
18th December 2003 21:54 UTC
It's quite easy to detect which files are required by your VB application.
You always have to install the VB runtime files (see NSIS documentation for details) and other controls or DLLs you are using for your project (see controls and references in the VB IDE).