Archive: GetWindowsVersion updated for WinSE stopped working...


GetWindowsVersion updated for WinSE stopped working...
GetWindowsVersion updated for WinSE stopped working...

In the archive there is function
GetWindowsVersion updated for Windows SE

I am running Win98SE and am using this function. This function stopped working when I updated via CVS yesterday. Before that it worked just fine. Now it returns an empty string instead of '98 SE' as it should do.

GetWindowsVersion from Appendix B works just fine, so the problem is only with the modified version that is in the archive.

Does the modified version of GetWindowsVersion need to be updated to be compatible with the latest CVS?

If so, that is fine, I can change my code to use the standard version of GetWindowsVersion, which I may do in any event.

Or, is this a development problem that needs to be corrected so the modified version of GetWindowsVersion in the Archive will work again?

Thank you,
Lilla


Try now with the ClearErrors I have added to the function.


Thanks, will do!

Lilla


Kichik. Sorry, with ClearErrors I see no change. Still reports empty string instead of '98 SE'

Lilla


I am sorry, but I don't have the time right now to test this. Try adding a few message boxes along the way and check this out, especially around the lbl_win32_98 part. If you don't get it by tomorrow I'll try again.


Ok, I'll give it a try, I'll post back with my results.

Lilla


OK, here's what I figured out.

Regarding GetWindowsVersion in Appendix B.

ClearErrors
This line should be added to the function.
I *just* updated via CVS and this line is not there.

Observations:
this function uses HKLM (not HKCU)
this function works.

---------------------------------------------

Regarding GetWindowsVersion updated for Windows 98 SE in the Archive

ClearErrors - Kichik added this line today.

observations:
this function uses HKCU (vs HKLM used by function in Appendix B)
this function does NOT work

I changed HKCU to HKLM and now this function works!
So, it appears then that this change needs to be made to the Archive, or at least a comment that if you are using NSIS v2 beta 4 you need to change HKCU to HKLM.

-------------

Hope this helps,
Lilla


Good catch.

There shouldn't be any difference between HKLM and HCKU through the different versions of NSIS, and there isn't. Everything else that relates to this still works for me. The code on the Archive though does say HKLM. It's possible that someone else has already updated though, it's owned by anonymous...


Thanks much. I thought that I had confirmed that the archived version used HKCU instead of HKLM, but retracing my steps it looks now that it was HKLM all along (not HKCU as I said it was). It was HKCU in my code, but that was evidently a problem that I introduced.

In any event, it was good that we discoving the missing ClearErrors.

Lilla