I'm using NSIS 2.46. Plugin I'm trying to use is HwInfo plug-in (Official Link). The ZIP file comes with some source codes and a DLL file. I put the HwInfo.dll
inside \NSIS\Plugins
directory. When adding a plugin, I'm supposed to !include
the .nsh
file as well, which HwInfo does not supply.
I'm trying to analyze the client's harware before installing-
Function .onInit
HwInfo::GetCpuSpeed
StrCpy $R0 $0
MessageBox MB_OK "You have a $0GHz CPU"
HwInfo::GetSystemMemory
StrCpy $0
MessageBox MB_OK "You have $0MB of RAM"
FunctionEnd
But the line HwInfo::GetCpuSpeed
is 'invalid command'
.
How do I use a plugin without a NSH file? And are there any alternatives?
Solved:
I added !addplugindir "${NSISDIR}\Plugins"
at the very top of this script. This helped detect HwInfo.dll
inside \NSIS\Plugins
directory at compile-time.