Remove a shared DLL: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Adding new author and category links.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{PageAuthor|sunjammer}} | |||
== Description == | == Description == | ||
This function decrements the references count of a shared DLL and removes it if necessary. | This function decrements the references count of a shared DLL and removes it if necessary. | ||
Line 35: | Line 37: | ||
FunctionEnd</highlight-nsis> | FunctionEnd</highlight-nsis> | ||
[[Category:DLL, OCX, TLB Functions]] |
Latest revision as of 13:40, 24 June 2005
Author: sunjammer (talk, contrib) |
Description
This function decrements the references count of a shared DLL and removes it if necessary.
The Function
; un.RemoveSharedDLL ; ; Decrements a shared DLLs reference count, and removes if necessary. ; Use by passing one item on the stack (the full path of the DLL). ; Note: for use in the main installer (not the uninstaller), rename the ; function to RemoveSharedDLL. ; ; Usage: ; Push $SYSDIR\myDll.dll ; Call un.RemoveSharedDLL ; Function un.RemoveSharedDLL Exch $R1 Push $R0 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 StrCmp $R0 "" remove IntOp $R0 $R0 - 1 IntCmp $R0 0 rk rk uk rk: DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 goto remove uk: WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 Goto noremove remove: Delete /REBOOTOK $R1 noremove: Pop $R0 Pop $R1 FunctionEnd