![]() |
#1 |
Junior Member
Join Date: Jul 2013
Posts: 2
|
How to detect Windows 8 ?
Hello,
can somebody please tell me how can i detect if a NSIS 2.46 setup file is running under Windows 8 ? I have made a context menu dll for the windows explorer and want to install the Visual C++ 2012 redistributable packages only if Windows 8 is installed. I know the rest,i simply do not know how to detect the version of Windows. Thank you ! |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
Use WinVer.nsh. The documentation and usage examples are included in the header. But the one that comes with v2.46 doesn't support Win 8 so replace it with the updated version linked here (Ansi; tell me if you need the version for Unicode NSIS):
http://forums.winamp.com/showpost.ph...7&postcount=71 PostEnd: |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Aug 2011
Posts: 19
|
the windows version should be 6.3 for 8.1 and 6.2 for 8 I think, and 6.1 for 7.
|
![]() |
![]() |
![]() |
#4 | |
Member
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
|
Quote:
See here: http://msdn.microsoft.com/en-us/libr.../dn302074.aspx Without this manifest GetVersion(Ex) will return version 6.2.2900 and not 6.3.9431 that is the version for the current public preview version. This signature is currently on vacation! |
|
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
I already compile my scripts with code that adds Win 8 compatibility to the manifest. With 8.1 added, it's:
code: I also updated WinVer.nsh. Now if only someone would actually test this. ![]() PostEnd: |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
You can add whatever GUID you want to the manifest in the alpha and the next alpha version has "real" support
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 | |
Member
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
|
Quote:
![]() ![]() At all good to see this will be done in NSIS 3. But for productive setups it is not recommended using Alpha versions. Therefore I'm still @2.46. This signature is currently on vacation! |
|
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
|
For me it works
![]() This signature is currently on vacation! |
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
Lovely jubbly. Thanks for testing and for pointing out the issue in the first place.
PostEnd: |
![]() |
![]() |
![]() |
#10 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
The exehead/stubs and plugins have not changed that much, mostly a merge of the Unicode fork. Most of the changes are related to the compiler and build system...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
You're seeing it from NSIS dev perspective. His is that of a person who uses NSIS to package products. Alpha/beta suffix is a scarecrow for users who take their business seriously. 3.0a may be perfectly stable but it won't really matter until it's officially released as such.
PostEnd: |
![]() |
![]() |
![]() |
#12 |
Junior Member
Join Date: Feb 2013
Posts: 9
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
Seam to do the trick from me. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|