WinVersion with Windows 8.1 and Winbatch 2014B

Started by smarr, December 24, 2014, 12:01:08 AM

Previous topic - Next topic

smarr

Hello,
I found a post about this, related to Winbatch 2013C, but with 2104B, unless  I did something wrong, winversion doesn't report the correct value, I am running Windows 8.1 :

Thanks for your help

************************************************************

*** Lancement du débogage ***

==============================
Mer 24/12/2014 08:55:47
WinBatch 32 2014B
WIL DLL 6.14bnb

D:\Winbatch\wbt\DiversSrc\test4.wbt
Windows platform: NT, version: 5.1, build: 2600 (Service Pack 3)
ErrorMode: @CANCEL
Valid Code Signature: Yes
UAC Manifest Settings: level="asInvoker" uiAccess="false"
UAC Elevation Level: Unsupported Platform
==============================

debugtrace(102, "c:\temp\winv.txt")
(63) VALUE=> INT => 1

Winv = WinVersion(5)
(63) VALUE=> STRING => "2-5-1"

td

The WinBatch 2014B WinVersion function does report the correct Windows version, 2-6-3, for Windows 8.1. That is easy enough to demonstrate. 

But your debug trace output and the WinVersion results strongly suggest that someone has been fiddling with the compatibility settings for WinBatch or for a compiled WinBatch script.  WinBatch is fully compatible with Windows 8.1 and there is no reason to set any compatibility settings for it.  In fact, setting compatibility to an earlier version of Windows may make WinBatch incompatible.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

smarr

There are no particular settings for winbatch on this machine. Just UAC is fully diseabled  Once compiled the same source returns the correct value ...
Your thought

Thanks

td

You can't disable UAC on Windows 8.1.  You can only disable UAC prompting.  On Windows 8.1 even with UAC prompting disabled Admin process run with a restricted access token unless manifest to do otherwise. But irregardless, UAC settings do not affect version reporting.

The symptoms you describe still point to compatibility settings fiddling because as previously mentioned, it is very easy to show that WinBatch 2014B reports the correct version of Windows on Windows 8.1. How have you checked for compatibility settings? The settings are stored in the registry under

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers


It is also very curious that your debug trace shows 'level="asInvoker" uiAccess="false"' instead of 'level="highestAvailable" uiAccess="true"'.  The latter is how the WinBatch.exe image is manifested and what is normally reported in the debug trace file. Assuming that the debug trace is from the execution of a script via Winbatch.exe, it suggest that there is something very suspect about your installation...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Also, compatibility settings are under HKEY_CURRENT_USER which means that each user account on the system can have its own set of compatibility settings.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

smarr

Thanks for these explanation,

The reason could be that winbatch.exe is wrapped with an exe  having a value of : ^ WINXPSP3 in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

btw I confirm that UAC is completely removed from my system : EnableLUA  value set to 0 in 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

I know it is not not recommended, but need it for old application.

Thanks

td

Quote from: smarr on December 29, 2014, 01:09:44 AM
Thanks for these explanation,

The reason could be that winbatch.exe is wrapped with an exe  having a value of : ^ WINXPSP3 in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Assuming you mean that value is associated with the WinBatch.exe executable image then that is not a 'could be'. That setting definitely causes WinBatch to report XP as the OS version on Windows 8.1.

Quote
btw I confirm that UAC is completely removed from my system : EnableLUA  value set to 0 in 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

I know it is not not recommended, but need it for old application.


It's not removed by that GP setting. It is just turned off.  And yes group policy settings can be used to disable UAC on Windows 8.1. Generally, users think UAC is disable by moving the slider in the UAC commandlet to the No Prompt setting.  That worked on Windows 7 but is not the case on Windows 8.1.  Irregardless, UAC has no affect on version reporting but I did overstated my case with respect to the ability to turn off UAC and should have mentioned the above in my previous response.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade