Archive: Sysinfo Problems with Win98SE


Sysinfo Problems with Win98SE
Hi there I'm having a problem with the Sysinfo plugin for Win 98

It works fine with WinXP Pro but it just doesn't work with Win 98


Function .onInit
sysinfo::GetFileVersion "$INSTDIR\XwingAlliance.exe"
Pop $0
Push $0
Push "."
Push ""
Call StrReplace
Pop $0
IntCmp $0 2002 +3 0 +3
MessageBox MB_ICONSTOP|MB_OK "WARNING: Incorrect game \
version$\r$\n$\nX-Wing: Alliance has not yet been updated to version \
2.02.$\r$\n$\nPlease install the xwaupd202.exe, available at \
http://www.lucasarts.com/ $\r$\n$\nbefore attempting to install \
$(^Name)."
Abort
FunctionEnd

Function StrReplace

blah blah
FunctionEnd


The Install Dir is taken from the Reg


InstallDirRegKey HKLM "Software\LucasArts Entertainment Company LLC\X-Wing Alliance\v1.0" "Install Path"


Its just not picking up the FileVersion from the exe using Win98 where as using WinXP it work fine

Does anyone know how to fix this?

If so could you show me please as its really starting to frustrate me now :igor:

Anyone?


You'd better contact the author of this plug-in.


Why aren't you using GetDLLVersion for this? It does the same thing (reads dwFileVersionMS and dwFileVersionLS) only it doesn't format it for you in a string. Use the following function to format the string:

http://nsis.sourceforge.net/archive/...e.php?pageid=5


Thanks so much Kichik it now works with Win98

Just one last thing, this works fine but I would just like you or someone to check to see if I have done it right


GetDLLVersion "$INSTDIR\XwingAlliance.exe" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $0 "$R2$R3$R4$R5"
IntCmp $0 2002 +3 0 +3
MessageBox MB_ICONSTOP|MB_OK "message blah blah"
Abort


Again thanks

Seems right.


ok thanks :)