Hi,
we're using the function Get Exact OS Level to detect the windows version in our installer code.
It returns strings like e.g. "SEVEN" or "2008R2". Could you please tell me where the function take the windows version information from. Is it directly taken from the registry or do you use a win api function?
Thanks in advance!
Greets,
Stefan
Get Exact OS Level
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Get Exact OS Level
Dear Stefan,
Please have a look at the following form topic;
http://www.installaware.com/forum/viewtopic.php?f=2&t=9363
Regards
Please have a look at the following form topic;
http://www.installaware.com/forum/viewtopic.php?f=2&t=9363
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 15
- Joined: Fri Feb 01, 2013 5:23 am
Re: Get Exact OS Level
Hi Francesco,
thank you for your reply. Good to know.
But could you tell me how the Get Exact OS Level really works? It would be great to know from where it takes the version information from.
Thanks and Greets,
Stefan
thank you for your reply. Good to know.
But could you tell me how the Get Exact OS Level really works? It would be great to know from where it takes the version information from.
Thanks and Greets,
Stefan
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Get Exact OS Level
Dear Stefan,
InstallAware use the same WINAPI but instead of returning the OS number identifier, it returns a string.
Regards
InstallAware use the same WINAPI but instead of returning the OS number identifier, it returns a string.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 15
- Joined: Fri Feb 01, 2013 5:23 am
Re: Get Exact OS Level
Hi Francesco,
ah okay allright.
Is it also possible in InstallAware to get the Major Version from the DWORD value which the GetVersion function returns?
Thanks in Advance!
Greets,
Stefan
ah okay allright.
Is it also possible in InstallAware to get the Major Version from the DWORD value which the GetVersion function returns?
Thanks in Advance!
Greets,
Stefan
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Get Exact OS Level
Dear Stefan,
You should use the "Mathematics" IA command to perform a BitWise operation on the value returned by the WINAPI function.
To know in which way this has to be applied to the given value, please refer to MSDN documentation about "LOBYTE" & "HIBYTE" macros.
Regards
You should use the "Mathematics" IA command to perform a BitWise operation on the value returned by the WINAPI function.
To know in which way this has to be applied to the given value, please refer to MSDN documentation about "LOBYTE" & "HIBYTE" macros.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 15
- Joined: Fri Feb 01, 2013 5:23 am
Re: Get Exact OS Level
Hi Francesco,
okay i'll have a look at this. Thank you very much!
Greets,
Stefan
okay i'll have a look at this. Thank you very much!
Greets,
Stefan
Re: Get Exact OS Level
Did you succeed with that approach?
I get a big number from GetVersion, but trying to perform any Mathematics operation on it always returns an empty string.
I get a big number from GetVersion, but trying to perform any Mathematics operation on it always returns an empty string.
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch
http://www.paraeasy.ch
http://ulrichard.ch
-
- Posts: 15
- Joined: Fri Feb 01, 2013 5:23 am
Re: Get Exact OS Level
Hi ulrichard,
yes with this code you should get the major and minor os version:
~InstallAware Clipboard Data~
~End~
~{D47856D1-A3A3-4EE7-A298-4107887853B1}~
~MessageBox~
~{9F6588E0-3ADE-4F97-BB59-68B3B09E963A}~
~$TITLE$ Setup Error~
~Unable to detect the OS Version. $NEWLINE$$NEWLINE$The Kernel32.dll function GetVersion returned 0.$NEWLINE$$NEWLINE$Setup cannot continue.~
~3~
~1~
~~
~Else~
~{C0BB8F39-49E2-4D2F-8BDD-68EA7D4BFDB1}~
~Mathematics~
~{D2735E79-EAEC-419F-893D-7C1A6136E7CE}~
~$OS_VERSION_LOW_WORD$~
~8~
~9~
~OS_VERSION_MINOR~
~Mathematics~
~{9C67AD34-07BE-41AB-97E2-48B82A287472}~
~$OS_VERSION_LOW_WORD$~
~255~
~5~
~OS_VERSION_MAJOR~
~Mathematics~
~{B5057DED-8895-4094-A39C-A5E8A0097719}~
~$OS_VERSION$~
~16~
~9~
~OS_VERSION_HIGH_WORD~
~Mathematics~
~{86CEE8DD-BEEF-44FA-95F3-568C86F137F9}~
~$OS_VERSION$~
~65535~
~5~
~OS_VERSION_LOW_WORD~
~If~
~{0E972074-727E-4BB0-8FB3-D159633354EA}~
~OS_VERSION~
~0~
~0~
~TRUE~
~Call DLL Function~
~{3145C9BB-38F4-4CD1-BC25-0FA8E5B1D7C6}~
~Kernel32.dll,GetVersion,"double word",OS_VERSION,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Comment~
~{8A90410F-CF50-4E3D-A132-8C1E9E2ABE7B}~
~WinApi GetVersion~
~Set Variable~
~{CC332351-3B2A-4B8B-ADEC-E6CB4700EBB4}~
~OS_VERSION_MINOR$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{A4E2F3EA-EF7B-42A3-9D53-B4C5CBCFF29E}~
~OS_VERSION_MAJOR$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{DBF3268A-368A-4E9B-90CB-8BD8B89E80A5}~
~OS_VERSION_HIGH_WORD$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{368A1B81-1756-4778-BDB8-1BF525BF6B22}~
~OS_VERSION_LOW_WORD$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{2AD9578D-1833-4FA4-8233-2BB87A5FD990}~
~OS_VERSION$MYAH$MYAH$FALSE~
~0~
regards,
Stefan
yes with this code you should get the major and minor os version:
~InstallAware Clipboard Data~
~End~
~{D47856D1-A3A3-4EE7-A298-4107887853B1}~
~MessageBox~
~{9F6588E0-3ADE-4F97-BB59-68B3B09E963A}~
~$TITLE$ Setup Error~
~Unable to detect the OS Version. $NEWLINE$$NEWLINE$The Kernel32.dll function GetVersion returned 0.$NEWLINE$$NEWLINE$Setup cannot continue.~
~3~
~1~
~~
~Else~
~{C0BB8F39-49E2-4D2F-8BDD-68EA7D4BFDB1}~
~Mathematics~
~{D2735E79-EAEC-419F-893D-7C1A6136E7CE}~
~$OS_VERSION_LOW_WORD$~
~8~
~9~
~OS_VERSION_MINOR~
~Mathematics~
~{9C67AD34-07BE-41AB-97E2-48B82A287472}~
~$OS_VERSION_LOW_WORD$~
~255~
~5~
~OS_VERSION_MAJOR~
~Mathematics~
~{B5057DED-8895-4094-A39C-A5E8A0097719}~
~$OS_VERSION$~
~16~
~9~
~OS_VERSION_HIGH_WORD~
~Mathematics~
~{86CEE8DD-BEEF-44FA-95F3-568C86F137F9}~
~$OS_VERSION$~
~65535~
~5~
~OS_VERSION_LOW_WORD~
~If~
~{0E972074-727E-4BB0-8FB3-D159633354EA}~
~OS_VERSION~
~0~
~0~
~TRUE~
~Call DLL Function~
~{3145C9BB-38F4-4CD1-BC25-0FA8E5B1D7C6}~
~Kernel32.dll,GetVersion,"double word",OS_VERSION,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Comment~
~{8A90410F-CF50-4E3D-A132-8C1E9E2ABE7B}~
~WinApi GetVersion~
~Set Variable~
~{CC332351-3B2A-4B8B-ADEC-E6CB4700EBB4}~
~OS_VERSION_MINOR$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{A4E2F3EA-EF7B-42A3-9D53-B4C5CBCFF29E}~
~OS_VERSION_MAJOR$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{DBF3268A-368A-4E9B-90CB-8BD8B89E80A5}~
~OS_VERSION_HIGH_WORD$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{368A1B81-1756-4778-BDB8-1BF525BF6B22}~
~OS_VERSION_LOW_WORD$MYAH$MYAH$FALSE~
~0~
~Set Variable~
~{2AD9578D-1833-4FA4-8233-2BB87A5FD990}~
~OS_VERSION$MYAH$MYAH$FALSE~
~0~
regards,
Stefan
-
- Posts: 15
- Joined: Fri Feb 01, 2013 5:23 am
Re: Get Exact OS Level
Hi Francesco,
I have a new question on this topic.
Microsoft announced that the WinApi function GetVersion and GetVersionEx may be altered or completly unavailable for Windows versions greater than 8.1.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Instead of them there will be new helper function for checking the OS version.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Does InstallAware 18 already support the new helper functions or other functionality, so that this will be no future problem. We are currently evaluating InstallAware 18 and this would be a good reason to upgrade.
Thanks and greets,
Stefan
I have a new question on this topic.
Microsoft announced that the WinApi function GetVersion and GetVersionEx may be altered or completly unavailable for Windows versions greater than 8.1.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Instead of them there will be new helper function for checking the OS version.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Does InstallAware 18 already support the new helper functions or other functionality, so that this will be no future problem. We are currently evaluating InstallAware 18 and this would be a good reason to upgrade.
Thanks and greets,
Stefan
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Get Exact OS Level
Dear Stefan,
in reality and for what I recall, at least are more then 3 years that this function is marked as possibly obsolete ... they constantly update the OS from which it could be unavailable.
Of course InstallAware now uses internally the new one.
Regards
in reality and for what I recall, at least are more then 3 years that this function is marked as possibly obsolete ... they constantly update the OS from which it could be unavailable.
Of course InstallAware now uses internally the new one.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: Google [Bot] and 72 guests