Archive: n00b in need of some system.dll assistance


n00b in need of some system.dll assistance
I've combed over docs/archive/forum as best I can and am still at a loss on how to properly use system.dll. First and foremost, how does one include the dll in the NSIS install script? Once that's accomplished, I assume that you can write functions that call on system.dll for various things (like free memory, cpu type, etc.)? If there's some pre-existing and realistic example script out there, plase direct me towards it. FWIW, I'm trying to get my installer to pick up basic computer information as part of on optional survey.

Overall, I must say I'm very impressed with NSIS, so much that I got my employer to drop WISE.

Thanks in advance.

- Seth


Are you familiar to the API concept?
If you are Visual Basic, C++ or other programming language
you'll notice that sometimes you need api calls...


For example:


Declare Function GetSystemMetrics Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long

It's a Visual Basic 6 typical API declaration.
In system words:

System::Call 'user32::GetSystemMetrics(i 43) i .r0'

43 will detect the number of buttons in your mouse... :)

OutFile "NumberMouseButtons.exe"
Name "Number of Mouse Buttons"
Caption "Number of Mouse Buttons"
XPStyle "on"

Function ".onInit"
System::Call 'user32::GetSystemMetrics(i 43) i .r0'
Messagebox MB_OK "$0"
Quit
FunctionEnd

Section "-boo"
;
SectionEnd