blayde
19th January 2004 10:10 UTC
Sysinfo and Win2000 fails
Please help if you can, For me SunJammers SysInfo dll does not work on windows 2000.
i have compiled the test that comes with the dll, and every single call fails. the error roughly reads "cannont load c:\test\sysinfo.dll"
the output i get instead of the expected numbers is the the name of the 'attribute' i was looking for. eg for
!insertmacro GetSysVer 'MajorVersion'
StrCpy $VerOSMajor $9
The variable $VerOSMajor will end up containg the string "MajorVersion"
it works fine on my work machine, winXP, but i just formatted and setup a Win2k Sp3 machine and it fails on that.
i can only assume it's the line, from the example with the dll, containing CallInstDLL in
!macro GetSysVer VALUE
Push ${VALUE}
CallInstDLL "$R0" GetSystemVersionValue
Pop $9
DetailPrint 'GetSystemVersionValue: ${VALUE}: $9'
!macroend
that is failing, since i see nowhere else for the error to occur.
i've tried hardcoding a location for the dll, and researched the archives for anything relating to 'sysinfo' or 'CallInstDLL' but with no solution.
help :)
Joost Verburg
19th January 2004 14:45 UTC
For normal plug-ins that extend your installer, use the plug-in command plugin::function.
Example:
SystemInfo::GetSystemVersionValue
You also don't have to use a plug-in to get the Windows version, you can also use the GetWindowsVersions function (see the Users Manual).
CallInstDLL is intented to call a DLL file that already exists on the system. To use it, you will have to include the file, extract it to a temporary location and delete it afterwards. Of course you can't use a run-time variable with the location of the DLL on your system, it should be on the users system.
blayde
20th January 2004 06:53 UTC
thanks, i was looking doing that but i wasn't sure how to go about it. but i've changed the code, now i know it can be done.
problem : the code works fine on my machine ( xp ), but it still fails on win2000. i no longer get any message about the dll failing to load, i guess becuase that is now left up to NSIS. but the output from the functions is still the same ( as above ).
Help :)
Note : the change i did is simple, but i can post an attachment of the entire test .nsi if need be.
the function above changed to
!macro GetSysVer VALUE
SysInfo::GetSystemVersionValue ${VALUE}
Pop $9
DetailPrint 'GetSystemVersionValue: ${VALUE}: $9'
!macroend
Joost Verburg
20th January 2004 08:11 UTC
Using the same VALUE? Tried the GetWindowsVersion function?
blayde
20th January 2004 08:22 UTC
yes, it worked to a greater degree but not perfectly, but i think that was down to me being a noob. my code, using GetWindowsVersion, _had_ detected that it was 200x. i had code that tested for "00" and "03", but wasn't working right. it was as i was about to debug it that i found SysInfo.
blayde
20th January 2004 16:39 UTC
i've now successfully used GetWindowsVersion and the line
[code]
ReadRegStr $R6 HKLM "Software\Microsoft\Windows Nt\CurrentVersion" CSDVersion
[\code]
to get the version and service pack of windows.
so _my_ problem of being able to get those things is gone, but the issue still stands.