|
|
|
|
#1 |
|
Junior Member
Join Date: Jun 2004
Posts: 5
|
Shared DLLs usage count
I would to know if there is a way to automatically handle usage counting for shared DLLs. As you must know, Windows has a mechanism to keep count of shared DLLs, so that setup programs can know when to unregister and delete the shared DLL. I can't find any info on it.
thanks for any help |
|
|
|
|
|
#2 |
|
Major Dude
|
Check out the VB Runtime Install script for details as it uses this counter.
Vytautas |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2004
Posts: 5
|
I can't find this script in the Examples folder...can you give me the exact name of the .nsi file?
|
|
|
|
|
|
#4 |
|
Major Dude
|
I think that it's available in the NSIS Archive on the net. However you can also read the two articles in the NSIS Help file. Appendixes B9 and B10
Vytautas |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2003
Location: The Netherlands
Posts: 5
|
I'm using this script with some succes. Only, Microsoft recommends increasing Shared DLL count to 1 if the file is already present on the system, so that programs that didn't correctly increase DLL count still work after the user uninstalls your application.
I've tried implementing this in the UpgradeDLL macro in the following way: (last four lines are by me) code: Only this one seems to have some flaws. Can anyone spot what is going wrong? |
|
|
|
|
|
#6 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
UpgradeDLL does not handle the shared DLL user count. You should update the AddSharedDLL function.
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2003
Location: The Netherlands
Posts: 5
|
code: This seems to work perfectly. Thanks! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|