Hi again,
I don't think I'm seeing the same behavior - here's what I'm thinking and experiencing. First, I think we should see this problem with just a plain exe, since the exe will have to be built under the installer, which will later just install it. Thus, I set out trying to break things by building an exe. So here's what I did (all in 7.1):
0. everything below is using the same add.dll and subtract.dll discussed in this thread.
1. created a LabVIEW-built exe from Call Add Dll.vi (its name gives away its functionality) using the add.dll and made sure it added as expected (I had to make the CLFN be "Reentrant" instead of "Run in UI Thread" but that is a known bug - if this doesn't make sense already just ask and I'll explain further)
2. opened Call Add Dll.vi and changed the CLFN to point to subtract.dll (and to the add function inside, which actually performs subtraction) and then saved and closed the VI (even if you don't close it, when you build an exe, it will ask you to close any VIs used in building the exe).
3. built the exe again using the same build script as defined for and used in step 1, and indeed, the subtraction operation was performed as expected.
So, as long as you have saved your VI after pointing it to a new dll, you should be ok... even if you don't close the VI, it'll make you close it and build the exe after that VI is closed (I did try it this way as well). To be totally sure, I tried to trick the exe builder by opening the Add.vi which actually adds two numbers, but pointing Call Add Dll.vi to the subtract.dll function (which subtracts despite the name add, and more importantly is based on a VI named Add.vi which actually subtracts). Now, in the LabVIEW development environment, I can easily "choose" whether I want addition or subtraction to occur in Call Add Dll.vi, if before opening Call Add Dll.vi I just open whichever version of Add.vi I'd like (the one that adds or the one that subtracts), I can definitely make Call Add Dll.vi either add or subtract, regardless of which dll I'm pointing to because LabVIEW underneath is looking to load Add.vi since that is what both dlls use, and since it's already open under my scenario, it won't go looking for it. HOWEVER, I observe that even if I get my Call Add Dll.vi into a state where, for example, I'm pointing to add.dll, but I have already opened Add.vi which actually SUBTRACTS, that if I build the exe, it will still take the Add.vi which ADDS, and NOT use the one which subtracts as the Call Add Dll.vi in the development environment would have done.
Thus, I think I'm seeing different behavior than you. Just for sanity, can you try rebuilding an exe or an installer under similar circumstances? If you could just disable the installer buidling from your tab, it will save some time actually. Hopefully you'll find that your exes build like I've described above, which is to build correctly according to which dll you've selected in your CLFN, regardless of which version of (in my case) an Add.vi I have open while building the exe.
This has been an interesting discussion, so I definitely want to make sure we're on the same page about everything!
Thank you again,
Best Regards,
JLS