[osg-users] Windows 7 beta: "The binary is not a valid Windows image."

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Sat Mar 28 20:24:31 PDT 2009

Hi Philip,

Thanks for your insight.

> You might be able to use the ProductName, CDSVersion, CurrentVersion, 
> and/or CurrentBuildNumber fields in the following part of the registry 
> to determine if you're building on the Windows 7 Beta.
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

OK, seems ProductName contains "Windows 7 Ultimate" so using a test such 
as "contains 'Windows 7'" should work.

> 1.  Use the output of "reg query" in an execute_process() cmake command 
> (or something similar)
>     reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v 
> CurrentBuildNumber

Using execute_process(), will CMake return the resulting string? If so, 
can I then do a pattern match (like a regex) on that string?

Thanks again,

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com

More information about the osg-users mailing list