Draske

@OSVersion on Windows 10 recognized as Windows 8.1 when compiled

27 posts in this topic

Hi All,

 

I run Autoit 3.3.14.1 and SciTE Version 3.5.4 on Windows 10

When running a script @OSVersion returns Win_10, as it should be. However when compiled the script returns Win_81. The compile screen shows it it is using AutoIT 3.3.141. I removed Autoit and SciTE and reinstalled without avail. A "normal" compile (without SciTe) gives the correct result (Win_10). What do I miss ?

 

Share this post


Link to post
Share on other sites



Thank you for the feedback,

That was one of my first thoughts. I created x86 and x64 versions with both compilers gives the same results. The "Compile with Options" or the Build command (CTRL+7) from SCiTE always creates a version which returns Win_81 on the variable. Other compilers and running F5 from the editor gives me Win_10 as result.

 

 

Share this post


Link to post
Share on other sites

How did you run this EXE files ?
Do they have set compability mode ?

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

Here are my .au3 registry settings:

 

******************************************************************************************************************************************
* HKCR\.au3 Default       :AutoIt3Script
* HKCR\.au3 ShellNew      :C:\WINDOWS\SHELLNEW\Template.au3 (File Exists)
******************************************************************************************************************************************
* Explorer shell options:
* HKCR\AutoIt3Script\shell:
*  => Default Action:Open
*     Compile                => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l"
*     Compile with Options   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /in "%l"
*     CompileX64             => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe_x64.exe" /in "%l"
*     CompileX86             => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l"
*     Edit                   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1"
*     Open                   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1"
*     Run                    => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %*
*     RunX64                 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "%1" %*
*     RunX86                 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %*
******************************************************************************************************************************************
* User SciTE info:
*    SCITE_USERHOME:C:\Users\info_000\AppData\Local\AutoIt v3\SciTE:
*    SciTEUSer.Properties:
*-----------------------------------------------------------------------------------------

title.full.path=1

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

I have deleted the entire C:\Program Files (x86)\AutoIt3\ dir in case some older file was not overwritten by the installer, and reinstalled the latest Autoit and SciTE from the website, same results.

 

 

 

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Can you show me the SciTE Console output when you compile it?

Jos

I think it is something else ...that why I asked this question.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "G:\Script\Systemscan 2\Scan.au3"
+>23:57:28 Starting AutoIt3Wrapper v.15.729.1555.1 SciTE v.3.5.4.0   Keyboard:00020409  OS:WIN_10/  CPU:X64 OS:X64    Environment(Language:0413)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\info_000\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\info_000\AppData\Local\AutoIt v3\SciTE
-> 1 Change(s) made.
>Running AU3Check (3.3.14.1)  from:C:\Program Files (x86)\AutoIt3  input:G:\Script\Systemscan 2\Scan.au3
+>23:57:36 AU3Check ended.rc:0
>Running:(3.3.14.1):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "G:\Script\Systemscan 2\Scan.au3" /out "C:\Users\info_000\AppData\Local\AutoIt v3\Aut2exe\~AU3blsmoqt.exe" /nopack /icon "G:\Script\Systemscan 2\ASCn.ico" /comp 2
+>23:57:38 Aut2exe.exe ended.C:\Users\info_000\AppData\Local\AutoIt v3\Aut2exe\~AU3blsmoqt.exe. rc:0
>23:57:38 Performing the Program Resource Update steps:
...>Updating Program Version information.
...>Setting Program ExecutionLevel Manifest information to requireAdministrator
...>Setting Program Compatibility Manifest information to Windows8.1
...>Updating Program Manifest information.
...>Adding original Script source to RT_RCDATA,999 in the Output executable.
>23:57:38 Program Resource updating finished successfully.
+>23:57:38 Created program:G:\Script\Systemscan 2\systemscan.exe
-Updated the Source Version to:2.1.7.1082
+>23:57:38 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 10.49

 

Share this post


Link to post
Share on other sites

IIRC I tested that aut2exe and @osversion worked ok. Jos, are you forcing a default manifest by any chance? Default needs to be the win10 manifest now.

That was what I was thinking too. Need to check the Manifest you are using now and make sure it is the same when AUtoIt3Wrapper needs to update it.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It seem to do set a compatibility setting during compiling. Compatibility is disabled on the exe. Windows 8.1 is pre-set but of course greed out.

Share this post


Link to post
Share on other sites

Could you test the current Autoit3Wrapper.au3 in the Beta directory to see if that fixes it as I can;t test it yet?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Something I can do to avoid this ?

Share this post


Link to post
Share on other sites

Could you test the current Autoit3Wrapper.au3 in the Beta directory to see if that fixes it as I can;t test it yet?

Jos

Seen my post above your last one?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Sorry, my browser seems not to refresh the cache quickly enough and I keep on missing replies. I tried the Beta and it worked fixed the problem ! Thank you all !!!

Share this post


Link to post
Share on other sites

No problem and thanks for testing ! :)

Just for the record this is the update::

#AutoIt3Wrapper_res_Compatibility=      ;Vista/Windows7/win7/win8/win81/win10 allowed separated by a comma.(Default=Win10)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi, I have that bug with Autoit 3.3.14.1 when I use "#pragma compile(Compatibility, win10)" directive, @OSVersion returns "WIN_81".

So I must don't use that #pragma directive ?

 

Thank you ;)

Share this post


Link to post
Share on other sites

The fix is not published yet and will be in the next Beta. Just don't set any  "#pragma compile(Compatibility, ..)" as the default should be correct.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

OK perfect, so by default, manifest contains all recent Windows compatibility ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now