I have now tried to get the "GetWindowsVersion" script to work in my modern installer, but can't get it to work. It always comes with this error:
1 warning:
install function "GetWindowsVersion" not referenced - zeroing code (81-117) out
- What am I doing wrong? I have enclosed the script. Its a simple one I took from the examples and pasted the "GetWindowsVersion" script in the Installer Functions section. Hope that somebody can help. 😢
Detect OS
3 posts
Actually, the warning in this case describes your problem exactly - the function is never referenced (called).
Defining an NSIS (or any other kind, for that matter) function does just that. To get useful work out of a defined funtion, you need to call it.
In this case, you need to say
Call GetWindowsVersion
from [presumably] your main installer section, and then supply some code which does something with the value that has been returned on the top of the stack.
Good Luck!
Defining an NSIS (or any other kind, for that matter) function does just that. To get useful work out of a defined funtion, you need to call it.
In this case, you need to say
Call GetWindowsVersion
from [presumably] your main installer section, and then supply some code which does something with the value that has been returned on the top of the stack.
Good Luck!
Yeah, for example:
Function .onInit
Call GetWindowsVersion
FunctionEnd