Chimaera

@OSVersion and Win 10

10 posts in this topic

Just a question any idea when this will be added to AutoIt?

Will we have 2? Win10DP (developers preview) and Win10? or will there be no need for the preview when it goes full release.

With these 10 upgrades from 7&8 im expecting quite a few in the shop for it when it releases

Share this post


Link to post
Share on other sites



Chimaera,

Add a feature request on Trac so it does not get forgotten. :)

M23


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

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

BTW, expecting a new version of Windows to be added to AutoIt before that new version is even out yet is a bit pushy. There's a lot of other ways of determining the version of Windows running other than @OSVersion that are probably more foolproofed anyways.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

No need to update it always, here or just need only to change the Kernel32.dll with Ntdll.dll, and GetVersionEx with RtlGetVersion

will have to be

Local $OSVERSIONINFOEX = DllStructCreate("dword OSVersionInfoSize;dword MajorVersion;dword MinorVersion;dword BuildNumber;dword PlatformId;char CSDVersion[128];word ServicePackMajor;word ServicePackMinor;ushort SuiteMask;BYTE ProductType")
    DllStructSetData($OSVERSIONINFOEX, "OSVersionInfoSize", DllStructGetSize($OSVERSIONINFOEX))
    Local $retVal = DllCall("Ntdll.dll", "INT", "GetVersion", "ptr", DllStructGetPtr($OSVERSIONINFOEX))
    If @Error Then
        $OSVERSIONINFOEX = FileGetVersion(@SystemDir & "\ntoskrnl.exe")
        If @Error Then $OSVERSIONINFOEX = FileGetVersion(@SystemDir & "\winver.exe")
        If @Error Then $OSVERSIONINFOEX = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion")
        $OSMajorVersion = StringLeft($OSVERSIONINFOEX, 1)
        $OSMinorVersion = StringMid($OSVERSIONINFOEX, 3, 1)
        $OSCurrentVersion = $OSMajorVersion & "." & $OSMinorVersion
        $OSServicePackMajor = StringRight(@OSServicePack, 1)
        $OSServicePackMinor = 0
        $OSBuildNumber = @OSBuild
        $OSCSDVersion = @OSServicePack
        $OSArchitecture = @OSArch
        $OSLanguage = @MUILang
        $OSUserName = @UserName
        $OSSystemDrive = @HomeDrive
        $OSVersionNumber = $OSCurrentVersion & "." & $OSBuildNumber
    Else
        $OSMajorVersion = String(DllStructGetData($OSVERSIONINFOEX, "MajorVersion"))
        $OSMinorVersion = String(DllStructGetData($OSVERSIONINFOEX, "MinorVersion"))
        $OSServicePackMajor = String(DllStructGetData($OSVERSIONINFOEX, "ServicePackMajor"))
        $OSServicePackMinor = String(DllStructGetData($OSVERSIONINFOEX, "ServicePackMinor"))
        $OSBuildNumber = String(DllStructGetData($OSVERSIONINFOEX, "BuildNumber"))
        $OSCSDVersion = String(DllStructGetData($OSVERSIONINFOEX, "CSDVersion"))
        ;;$OSPlatformId = String(DllStructGetData($OSVERSIONINFOEX, "PlatformId"))
        ;;$OSSuiteMask = String(DllStructGetData($OSVERSIONINFOEX, "SuiteMask"))
        ;;$OSProductType = String(DllStructGetData($OSVERSIONINFOEX, "ProductType"))
        $OSCurrentVersion = $OSMajorVersion & "." & $OSMinorVersion
        $OSArchitecture = @OSArch
        $OSLanguage = @MUILang
        $OSUserName = @UserName
        $OSSystemDrive = @HomeDrive
        $OSVersionNumber = $OSCurrentVersion & "." & $OSBuildNumber
    EndIf
 

Ciao.

Edited by DXRW4E

apps-odrive.pngdrive_app_badge.png box-logo.png new_logo.png MEGA_Logo.png

Share this post


Link to post
Share on other sites

BTW, expecting a new version of Windows to be added to AutoIt before that new version is even out yet is a bit pushy.

Actually i wasn't been pushy, i was working on the services thing im doing and i had just added the services set for Win 10 Dev Build and then realised i had no way to call it so ive had to hide that from the script for now.

Which is why i asked the question.

Im already using Windows 10 DB to be able to tell customers how to use it , ive already had people in the shop asking how to do the upgrade.

I have to be ready for it so it was a legitimate question

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