Archive: Questions about VB deployment & shared files


Questions about VB deployment & shared files
Hello Folks...

I've noticed a few threads discussing VB deployment with the NSIS installer. I know keeping track of all the DLLs is a pain, but I'm not worried about that. I'm worried about the "correct way to install VB DLLs".

There are two ways to go about doing this so far as I know. You can run the VB runtime distributable form microsoft, or you can do it yourself in your own NSIS script (manually).

The microsoft runtime distributable includes the basic VB dependencies, but not the tons, and tons of others like the tabbed dialog OCX, XML, etc... For that reason I'm more keen on doing the install myself in an NSIS script, since I have to handle all those others correctly anyhow.

So what is the process for those files? Here's my best guess. By the way, I'm not sure what a "shared dll" is technically. I know there is some registry tweaking involved for "reference counting" of some sort. The NSIS docs have a script to do that, but again, I'm not sure on the process.

The following process I assume is correct for the XML, TabbedDialog, and VB Runtime DLLs....

1. Copy the correct files into the system32 directory (using IfNewer)
2. Register the files you copied into the system32
3. Perform that "shared dll" voodoo on them all.

During the UNinstall you would... (not sure about this)

1. Perform the "shared dll" voodoo, and if the share count reaches 0, unregister and delete the DLL?

Also LAST question.

How does NSIS handle shared DLLs that are currently IN USE by the system (locked), like the OLDAUT dlls often are?

Thanks!

Mal.


The OLEAUT ones: you can use /REBOOTOK to replace them (once you find you can't replace them). A while ago I found that it was smaller to use the microsoft distro than to use your own script and compress the files, but that was before bzip2, so perhaps it's now smaller to use that solution instead. If you look for a VB post by me, you'll probably find a script which more or less covers what you want (but not reference counting) - and it doesn't use the new GetDLLVer commands yet, so it doesn't work anymore. Perhaps you'd better start from scratch -:(


The docs say that /REBOOTOK is only for DELETE and RENAME commands. How do I COPY with /REBOOTOK, and what does it do? Does it perform this action after reboot instead?

If I can get around this problem of locked OLEAUT files, then all should be well... I think.

Thanks again,

Mal.


Forgot to say:
Copy the DLL file to a temporary folder first, and then use Rename /REBOOTOK to replace the old one once the computer reboots. Note that with these OLEAUT & OLEPRO files, you must check the version first! Installing an old version over a new one is fairly dramatic for your user (programs will stop working)!


You can rename across directories?


Yes, I believe you can (normally, you can rename accross drives too), as the Windows Move command is used IIRC.
However, I'm not sure if the /REBOOTOK and accross directory is a good idea. Perhaps it's better to put them both in the System dir and then rename, because I think /REBOOTOK cannot rename across drives and if the temp dir is not on the same drive as Windows...