|
|
#1 |
|
Member
Join Date: Dec 2001
Posts: 89
|
Improved UpgradeDLL macro
The improved UpgradeDLL macro can upgrades DLLs that are in use.
!macro UpgradeDLL Exch $0 Push $1 Push $2 Push $3 Push $4 Push $5 ClearErrors GetDLLVersionLocal ${DLL_NAME} $1 $2 GetDLLVersion $0 $3 $4 IfErrors upgrade_${DLL_NAME} IntCmpU $1 $3 noupgrade_${DLL_NAME} noupgrade_${DLL_NAME} upgrade_${DLL_NAME} IntCmpU $2 $4 noupgrade_${DLL_NAME} noupgrade_${DLL_NAME} upgrade_${DLL_NAME}: GetTempFileName $5 File /oname=$5 ${DLL_NAME} UnRegDLL $0 delete /REBOOTOK $0 rename /REBOOTOK $5 $0 IfRebootFlag regreboot regnoreboot regreboot: WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\RunOnce $0 "$SYSDIR\regsvr32 /s $0" goto regrebootfinish regnoreboot: RegDLL $0 regrebootfinish: noupgrade_${DLL_NAME}: Pop $5 Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 !undef DLL_NAME !macroend |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|