Labels not used on compile but still needed
Here's my problem.
I'm using NSIS to patch the uxtheme.dll file for all versions of XP and Server 2003 by using FileWriteByte. I've successfully setup the code to hex edit the file.
However what I am trying to do is read the file version, then use the file version read to jump to a label like so:
Section "Patch uxtheme.dll"
ClearErrors
GetDLLVersion "$SYSDIR\uxtheme.dll" $R0 $R1
IntOp $0 $R0 / 0x00010000
IntOp $1 $R0 & 0x0000FFFF
IntOp $2 $R1 / 0x00010000
IntOp $3 $R1 & 0x0000FFFF
StrCpy $4 "$0.$1.$2.$3"
StrCpy "$5" "V$4"
Goto $5
DetailPrint "Your uxtheme.dll version is not supported by this patch at the moment."
Return
V5.1.2600.1106:
FileOpen $9 "uxtheme.dll" a
FileSeek $9 0x0000C3FF SET
FileWriteByte $9 "51"
FileWriteByte $9 "246"
FileWriteByte $9 "139"
FileWriteByte $9 "198"
FileWriteByte $9 "201"
FileWriteByte $9 "194"
FileWriteByte $9 "8"
FileWriteByte $9 "0"
FileClose $9
SectionEnd
And then when compiling it tells me
label "V6.0.3790.1159" not used
label "V6.0.3790.1184" not used
label "V6.0.3790.1218" not used
label "V6.0.3790.1247" not used
etc. etc.
When I run the installer, it correctly reads the file version, but it doesn't jump to the right section. Instead it just prints "Your uxtheme.dll version is not supported by this patch at the moment."
Does anyone know what I can do to solve this without using a million StrCmp functions?