Old 14th November 2014, 16:09   #1
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
Windows 8.1 being detected as 8.0

Sorry for posting this the other day and deleting it. My enduser told me about this issue and now I am seeing it happening for him and thought it was something else.

Anyway, I got this if statement that its supposed to do something if it is XP or Windows 8.0 to do one thing and if it is Windows Vista, 7, or 8.1 to do something else.
If I run this code on a Windows 8.1 machine, it will do the XP part of the if instead.

Any ideas as to why?

PHP Code:
${If} ${AtMostWin2003}
${
OrIf} ${IsWin8}
${
OrIf} ${IsWin2012}
DoXP
${Else}
DoVista and above
${EndIf} 
jweinraub is offline   Reply With Quote
Old 14th November 2014, 16:20   #2
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
http://forums.winamp.com/showthread.php?p=2949877
http://forums.winamp.com/showthread.php?t=375267

PostEnd:
aerDNA is offline   Reply With Quote
Old 14th November 2014, 16:47   #3
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
These seem relevant for NSIS v2. I am using 3.0b1.
jweinraub is offline   Reply With Quote
Old 14th November 2014, 16:51   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Do you have RequestExecutionLevel in your script? Or add "ManifestSupportedOS Win7 Win8 Win8.1 {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2014, 16:55   #5
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
No. How do I those options? Like where in the code does it go?
jweinraub is offline   Reply With Quote
Old 14th November 2014, 17:06   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
You should always use RequestExecutionLevel in your scripts, just put it near the top along with OutFile etc

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2014, 18:09   #7
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
Something like:
PHP Code:
Name "Foobar Software ${PRODUCT_VERSION}"
RequestExecutionLevel admin
OutFile 
"setup.exe" 
I think that did the trick, but that sysnative thing you helped me previously with does not work on 8.1 32-bit.

PHP Code:
nsExec::Exec '"$windir\sysnative\netcfg.exe" 
On a side question, I use HM NSIS Edit and for some reason, when it compiles it no longer shows the compiler output no more. It just shows processing...a long delay, then the output of the setup when it is completed.
jweinraub is offline   Reply With Quote
Old 14th November 2014, 18:40   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
sysnative only exists when a 32-bit program runs on a 64-bit version of Windows. Use x64.nsh to detect and fall back to $sysdir.

The default makensis verbosity has changed in v3.0.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2014, 19:14   #9
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
Quote:
Originally Posted by Anders View Post
sysnative only exists when a 32-bit program runs on a 64-bit version of Windows. Use x64.nsh to detect and fall back to $sysdir.

The default makensis verbosity has changed in v3.0.
Thank you. that did the trick. any idea how i can change the verbosity? if i use makensisw from the program files folder it seems to show me more info.
jweinraub is offline   Reply With Quote
Old 14th November 2014, 19:34   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Makensisw starts makensis with /v4. If you cannot change the commandline in your IDE you can use "!verbose 4" in your script.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st November 2014, 06:48   #11
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
code:
GetDLLVersion "$SYSDIR\kernel32.dll" $R0 $R1
IntCmpU $R0 0x00060003 _win_8_1 0 _win_def
IntCmpU $R0 0x00060002 _win_8
IntCmpU $R0 0x00060001 _win_7
IntCmpU $R0 0x00060000 _win_vista _win_def
_win_8_1:
DetailPrint "Windows 8.1"
Goto _win_done
_win_8:
DetailPrint "Windows 8"
Goto _win_done
_win_7:
DetailPrint "Windows 7"
Goto _win_done
_win_vista:
DetailPrint "Windows Vista"
Goto _win_done
_win_def
DetailPrint "Other Windows version."
_win_done:


Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Old 22nd November 2014, 23:10   #12
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
slighty off-topic, but i just ran across this

http://arstechnica.com/information-t...probably-work/
Yathosho is offline   Reply With Quote
Old 23rd November 2014, 00:05   #13
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Quote:
Originally Posted by Yathosho View Post
slighty off-topic, but i just ran across this

http://arstechnica.com/information-t...probably-work/
That's what happens when you let the marketing people mess with the version numbers.

It's Firefox all over again; version numbers don't matter to "normal" people so let's bump our number fast so we catch up with the competition (OSX 10.*, Chrome 3?.*).

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump