Results 1 to 9 of 9
  1. #1
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    Location
    South Glos., UK
    Posts
    3,693
    Thanks
    165
    Thanked 1,025 Times in 818 Posts

    AutoHotkey - Create your own Win 10 'winver' (updated)

    It appears that I cannot update my previous post as it's more than 141 days old (?)... so here's an update to the content. All it does is add support links to the version and/or build info on Microsoft's web pages:
    my_winver_with_support.png

    Perhaps one day I'll learn enough about programming to do away with all the if..else..if statements... but don't hold your breath.
    Code:
    #NoTrayIcon ; Don't display an icon in the Notification Area
    #SingleInstance,Force ; Only allow one instance of the script to run at a time
    SetWorkingDir %A_ScriptDir%
    ; First, a quick check that the script is only being used in Win 10
    if A_OSVersion in WIN_8,WIN_7,WIN_VISTA,WIN_2003,WIN_XP,WIN_2000,WIN_NT4,WIN_95,WIN_98,WIN_ME  ; Note: No spaces around commas.
    {
        MsgBox, 16, My WinVer, This script is only for Windows 10.
        ExitApp
    }
    url = https://support.microsoft.com/en-us/help/
    Clipboard = ; Empty the clipboard
    
    ; Read values from the registry
    RegRead, CurEd, HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion, ProductName ; Edition
    RegRead, CurVer, HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion, ReleaseID ; Version
    RegRead, CurBuild, HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion, CurrentBuild ; Build
    RegRead, CurSubBuild, HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion, UBR ; Revision (aka Cumulative update)
    
    ; Check architecture
    If %A_Is64bitOS% := 1
    	Bits=x64
    else
    	Bits=x32
    
    clipboard = %CurEd% %Bits% %CurVer% (Build %CurBuild%.%CurSubBuild%) ; Write the info to the clipboard
    Build = %CurBuild%.%CurSubBuild%
    
    if (CurVer = 1511) {
        ver_url = 4000824
    } else if (CurVer = 1607) {
        ver_url = 4000825
    } else if (CurVer = 1703) {
        ver_url = 4018124
    } else if (CurVer = 1709) {
        ver_url = 4043454
    } else if (CurVer = 1803) {
        ver_url = 4099479
    } else if (CurVer = 1809) {
        ver_url = 4464619
    }
    
    if (Build = 10586.154) {
    	build_url = 4093109
    } else if (Build = 10586.1478) {
    	build_url = 4088779
    } else if (Build = 10586.1417) {
    	build_url = 4074591
    } else if (Build = 10586.1358) {
    	build_url = 4075200
    } else if (Build = 10586.1356) {
    	build_url = 4056888
    } else if (Build = 10586.1295) {
    	build_url = 4053578
    } else if (Build = 10586.1232) {
    	build_url = 4048952
    } else if (Build = 10586.1177) {
    	build_url = 4052232
    } else if (Build = 10586.1176) {
    	build_url = 4041689
    } else if (Build = 10586.1106) {
    	build_url = 4038783
    } else if (Build = 10586.1045) {
    	build_url = 4034660
    } else if (Build = 10586.1007) {
    	build_url = 4025344
    } else if (Build = 10586.965) {
    	build_url = 4032693
    } else if (Build = 10586.962) {
    	build_url = 4022714
    } else if (Build = 10586.916) {
    	build_url = 4019473
    } else if (Build = 10586.873) {
    	build_url = 4015219
    } else if (Build = 10586.842) {
    	build_url = 4016636
    } else if (Build = 10586.839) {
    	build_url = 4013198
    } else if (Build = 10586.753) {
    	build_url = 3210721
    } else if (Build = 10586.713) {
    	build_url = 3205386
    } else if (Build = 10586.682) {
    	build_url = 3198586
    } else if (Build = 10586.679) {
    	build_url = 3198586
    } else if (Build = 10586.633) {
    	build_url = 3192441
    } else if (Build = 10586.589) {
    	build_url = 3185614
    } else if (Build = 10586.545) {
    	build_url = 3176493
    } else if (Build = 10586.494) {
    	build_url = 3172985
    } else if (Build = 10586.42) {
    	build_url = 3163018
    } else if (Build = 10586.318) {
    	build_url = 3156421
    } else if (Build = 10586.218) {
    	build_url = 3147458
    } else if (Build = 10586.164) {
    	build_url = 3140768
    } else if (Build = 10586.122) {
    	build_url = 3140743
    } else if (Build = 10586.104) {
    	build_url = 3135173
    } else if (Build = 14393.2608) {
    	build_url = 4467691
    } else if (Build = 14393.258) {
    	build_url = 4462928
    } else if (Build = 14393.2551) {
    	build_url = 4462917
    } else if (Build = 14393.2515) {
    	build_url = 4457127
    } else if (Build = 14393.2485) {
    	build_url = 4457131
    } else if (Build = 14393.2457) {
    	build_url = 4343884
    } else if (Build = 14393.243) {
    	build_url = 4343887
    } else if (Build = 14393.2396) {
    	build_url = 4346877
    } else if (Build = 14393.2395) {
    	build_url = 4338822
    } else if (Build = 14393.2368) {
    	build_url = 4345418
    } else if (Build = 14393.2363) {
    	build_url = 4338814
    } else if (Build = 14393.2339) {
    	build_url = 4284833
    } else if (Build = 14393.2312) {
    	build_url = 4284880
    } else if (Build = 14393.2273) {
    	build_url = 4103720
    } else if (Build = 14393.2248) {
    	build_url = 4103723
    } else if (Build = 14393.2214) {
    	build_url = 4093120
    } else if (Build = 14393.2189) {
    	build_url = 4093119
    } else if (Build = 14393.2156) {
    	build_url = 4096309
    } else if (Build = 14393.2155) {
    	build_url = 4088889
    } else if (Build = 14393.2126) {
    	build_url = 4088787
    } else if (Build = 14393.2125) {
    	build_url = 4088787
    } else if (Build = 14393.2097) {
    	build_url = 4077525
    } else if (Build = 14393.2068) {
    	build_url = 4074590
    } else if (Build = 14393.2034) {
    	build_url = 4057142
    } else if (Build = 14393.2007) {
    	build_url = 4056890
    } else if (Build = 14393.1944) {
    	build_url = 4053579
    } else if (Build = 14393.1914) {
    	build_url = 4051033
    } else if (Build = 14393.1884) {
    	build_url = 4048953
    } else if (Build = 14393.1797) {
    	build_url = 4052231
    } else if (Build = 14393.1794) {
    	build_url = 4041688
    } else if (Build = 14393.177) {
    	build_url = 4041691
    } else if (Build = 14393.1737) {
    	build_url = 4038801
    } else if (Build = 14393.1715) {
    	build_url = 4038782
    } else if (Build = 14393.167) {
    	build_url = 4039396
    } else if (Build = 14393.1613) {
    	build_url = 4034661
    } else if (Build = 14393.1593) {
    	build_url = 4034658
    } else if (Build = 14393.1537) {
    	build_url = 4038220
    } else if (Build = 14393.1532) {
    	build_url = 4025334
    } else if (Build = 14393.148) {
    	build_url = 4025339
    } else if (Build = 14393.1378) {
    	build_url = 4022723
    } else if (Build = 14393.1358) {
    	build_url = 4022715
    } else if (Build = 14393.123) {
    	build_url = 4023680
    } else if (Build = 14393.1198) {
    	build_url = 4019472
    } else if (Build = 14393.1083) {
    	build_url = 4015217
    } else if (Build = 14393.1066) {
    	build_url = 4015217
    } else if (Build = 14393.97) {
    	build_url = 4016635
    } else if (Build = 14393.969) {
    	build_url = 4015438
    } else if (Build = 14393.953) {
    	build_url = 4013429
    } else if (Build = 14393.729) {
    	build_url = 4010672
    } else if (Build = 14393.726) {
    	build_url = 3216755
    } else if (Build = 14393.693) {
    	build_url = 3213986
    } else if (Build = 14393.576) {
    	build_url = 3206632
    } else if (Build = 14393.479) {
    	build_url = 3201845
    } else if (Build = 14393.448) {
    	build_url = 3200970
    } else if (Build = 14393.447) {
    	build_url = 3200970
    } else if (Build = 14393.351) {
    	build_url = 3197954
    } else if (Build = 14393.321) {
    	build_url = 3194798
    } else if (Build = 14393.222) {
    	build_url = 3194496
    } else if (Build = 14393.189) {
    	build_url = 3193494
    } else if (Build = 14393.187) {
    	build_url = 3193494
    } else if (Build = 14393.105) {
    	build_url = 3176938
    } else if (Build = 14393.82) {
    	build_url = 3176934
    } else if (Build = 14393.51) {
    	build_url = 3176495
    } else if (Build = 14393.1) {
    	build_url = 3176929
    } else if (Build = 15063.1446) {
    	build_url = 4467696
    } else if (Build = 15063.1418) {
    	build_url = 4462939
    } else if (Build = 15063.1387) {
    	build_url = 4462937
    } else if (Build = 15063.1358) {
    	build_url = 4457141
    } else if (Build = 15063.1324) {
    	build_url = 4457138
    } else if (Build = 15063.1292) {
    	build_url = 4343889
    } else if (Build = 15063.1266) {
    	build_url = 4343885
    } else if (Build = 15063.1235) {
    	build_url = 4338827
    } else if (Build = 15063.1209) {
    	build_url = 4345419
    } else if (Build = 15063.1206) {
    	build_url = 4338826
    } else if (Build = 15063.1182) {
    	build_url = 4284830
    } else if (Build = 15063.1155) {
    	build_url = 4284874
    } else if (Build = 15063.1112) {
    	build_url = 4103722
    } else if (Build = 15063.1088) {
    	build_url = 4103731
    } else if (Build = 15063.1058) {
    	build_url = 4093117
    } else if (Build = 15063.1029) {
    	build_url = 4093107
    } else if (Build = 15063.994) {
    	build_url = 4088891
    } else if (Build = 15063.968) {
    	build_url = 4088782
    } else if (Build = 15063.966) {
    	build_url = 4088782
    } else if (Build = 15063.936) {
    	build_url = 4092077
    } else if (Build = 15063.936) {
    	build_url = 4077528
    } else if (Build = 15063.909) {
    	build_url = 4074592
    } else if (Build = 15063.877) {
    	build_url = 4057144
    } else if (Build = 15063.85) {
    	build_url = 4056891
    } else if (Build = 15063.786) {
    	build_url = 4053580
    } else if (Build = 15063.729) {
    	build_url = 4055254
    } else if (Build = 15063.728) {
    	build_url = 4048954
    } else if (Build = 15063.726) {
    	build_url = 4048954
    } else if (Build = 15063.675) {
    	build_url = 4049370
    } else if (Build = 15063.674) {
    	build_url = 4041676
    } else if (Build = 15063.632) {
    	build_url = 4040724
    } else if (Build = 15063.608) {
    	build_url = 4038788
    } else if (Build = 15063.54) {
    	build_url = 4034674
    } else if (Build = 15063.502) {
    	build_url = 4032188
    } else if (Build = 15063.483) {
    	build_url = 4025342
    } else if (Build = 15063.447) {
    	build_url = 4022716
    } else if (Build = 15063.414) {
    	build_url = 4022725
    } else if (Build = 15063.413) {
    	build_url = 4022725
    } else if (Build = 15063.332) {
    	build_url = 4020102
    } else if (Build = 15063.297) {
    	build_url = 4016871
    } else if (Build = 15063.296) {
    	build_url = 4016871
    } else if (Build = 15063.25) {
    	build_url = 4016240
    } else if (Build = 15063.138) {
    	build_url = 4015583
    } else if (Build = 15063.13) {
    	build_url = 4016251
    } else if (Build = 16299.785) {
    	build_url = 4467686
    } else if (Build = 16299.755) {
    	build_url = 4462932
    } else if (Build = 16299.726) {
    	build_url = 4462918
    } else if (Build = 16299.699) {
    	build_url = 4457136
    } else if (Build = 16299.666) {
    	build_url = 4464217
    } else if (Build = 16299.665) {
    	build_url = 4457142
    } else if (Build = 16299.637) {
    	build_url = 4343893
    } else if (Build = 16299.611) {
    	build_url = 4343897
    } else if (Build = 16299.579) {
    	build_url = 4338817
    } else if (Build = 16299.551) {
    	build_url = 4345420
    } else if (Build = 16299.547) {
    	build_url = 4338825
    } else if (Build = 16299.522) {
    	build_url = 4284822
    } else if (Build = 16299.492) {
    	build_url = 4284819
    } else if (Build = 16299.461) {
    	build_url = 4103714
    } else if (Build = 16299.431) {
    	build_url = 4103727
    } else if (Build = 16299.402) {
    	build_url = 4093105
    } else if (Build = 16299.371) {
    	build_url = 4093112
    } else if (Build = 16299.334) {
    	build_url = 4089848
    } else if (Build = 16299.309) {
    	build_url = 4088776
    } else if (Build = 16299.251) {
    	build_url = 4090913
    } else if (Build = 16299.248) {
    	build_url = 4074588
    } else if (Build = 16299.214) {
    	build_url = 4058258
    } else if (Build = 16299.201) {
    	build_url = 4073291
    } else if (Build = 16299.192) {
    	build_url = 4056892
    } else if (Build = 16299.125) {
    	build_url = 4054517
    } else if (Build = 16299.98) {
    	build_url = 4051963
    } else if (Build = 16299.64) {
    	build_url = 4048955
    } else if (Build = 16299.19) {
    	build_url = 4043961
    } else if (Build = 17134.407) {
    	build_url = 4467702
    } else if (Build = 17134.376) {
    	build_url = 4462933
    } else if (Build = 17134.345) {
    	build_url = 4462919
    } else if (Build = 17134.32) {
    	build_url = 4458469
    } else if (Build = 17134.286) {
    	build_url = 4464218
    } else if (Build = 17134.285) {
    	build_url = 4457128
    } else if (Build = 17134.254) {
    	build_url = 4346783
    } else if (Build = 17134.228) {
    	build_url = 4343909
    } else if (Build = 17134.191) {
    	build_url = 4340917
    } else if (Build = 17134.167) {
    	build_url = 4345421
    } else if (Build = 17134.165) {
    	build_url = 4338819
    } else if (Build = 17134.137) {
    	build_url = 4284848
    } else if (Build = 17134.112) {
    	build_url = 4284835
    } else if (Build = 17134.83) {
    	build_url = 4338548
    } else if (Build = 17134.81) {
    	build_url = 4100403
    } else if (Build = 17134.48) {
    	build_url = 4103721
    } else if (Build = 17763.134) {
    	build_url = 4467708
    } else if (Build = 17763.107) {
    	build_url = 4464455
    } else if (Build = 17763.55) {
    	build_url = 4464330
    } else if (Build = 17763.107) {
    	build_url = 4464455
    } else if (Build = 17763.134) {
    	build_url = 4467708
    } else if (Build = 17763.168) {
    	build_url = 4469342
    }
    
    Gui, -SysMenu
    Gui, Add, Picture, x12 y30 w30 h30 icon5, %A_WinDir%\system32\user32.dll
    Gui, Add, Text, x60 y20 w40 h20 , Edition:
    Gui, Add, Text, x100 y20 w120 h20 , %CurEd% %Bits%
    Gui, Add, Text, x60 y40 w40 h20 , Version:
    Gui, Add, Text, x100 y40 w40 h20 , %CurVer%
    Gui, Add, Text, x60 y60 w50 h20 , Build:
    Gui, Add, Text, x100 y60 w50 h20 , %CurBuild%.%CurSubBuild%
    Gui, Add, Text, x8 y80 w240 h20 , (The info above has been copied to the clipboard)
    Gui, Add, Link, x25 y100 w320 h20 , <a href="%url%%ver_url%">Click for VERSION support information</a>
    Gui, Add, Link, x35 y120 w320 h20 , <a href="%url%%build_url%">Click for BUILD support information</a>
    Gui, Add, Button, x80 y140 default w80, OK
    Gui, Font, norm
    GuiControl, Focus, Button1
    Gui, Show, w250 h170, My WinVer
    return
    
    ; GuiClose: ; Redundant as -SysMenu used to remove the system titlebar controls
    GuiEscape:
    ButtonOK:
    ExitApp
    EDIT: Updated 6th Dec '18 to add latest 1809 build update.

    Hope this helps...

  2. The Following User Says Thank You to Rick Corbett For This Useful Post:

    RetiredGeek (2018-12-01)

  3. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    10,101
    Thanks
    440
    Thanked 1,636 Times in 1,476 Posts
    Rick,

    Quite the piece of code and tons of research to divine all the URLs.

    I've been trans-coding it into PowerShell, of course!

    I'm this far along:

    CopyRick.JPG

    I'll have to switch from a MsgBox to an XML menu to be able to put the links in the dialog, work for another day.

    I've been transcribing the data for the URL lookup and I've noticed that several versions link to the same URL?

    10586.682 & 679 to 3198586
    14393.2126 & 2125 to 4088787
    14393.1803 & 1066 to 4105217
    14393.448 & .447 to 3200970
    14393.189 & .187 to 3193494
    15063.968 & .966 to 4088782
    15093.728 & .726 to 4048954
    This is as far as I've gotten in the transcription

    Also: 15063.936 points to two URLs 4092077 & 4077528

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #3
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    Location
    South Glos., UK
    Posts
    3,693
    Thanks
    165
    Thanked 1,025 Times in 818 Posts
    RG,

    I've gone back over my data and the problem is that MS' own webpages point to 2 different URLs for several builds. My code just repeated what MS has published at a certain point in time.

    There's another big problem... MS keeps changing the URLs. For example. I'm using Win 10 1803 Build 17134.48. My code faithfully reproduced what MS had previously published, i.e. the build info URL included 4467708. Today however that URL has been superceeded by another using 4103721 instead. It's practically impossible to code against a moving target.

    Rick

  5. #4
    3 Star Lounger
    Join Date
    Dec 2009
    Location
    Surrey, UK
    Posts
    292
    Thanks
    14
    Thanked 72 Times in 62 Posts
    Not having/using AutoHotKey, I thought I'd knock up my own version (without the links!) in VBS, using the Windows Script(ing) host, as I have used that for context menu items. That part was easy, so I thought I'd have a look at the data for the build-KB cross-references - oh no I won't! Looking at the source of an MS page with the data https://www.microsoft.com/en-us/itpr...se-information showed how complex it all is, with java script all over the place. I'd rather hoped to be able to find a data file (eg json) that I could 'parse', but I could not find anything easily. The link to the data is probably hidden inside one of the js files, so I gave up.

    How did you slurp the link data?

  6. #5
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    Location
    South Glos., UK
    Posts
    3,693
    Thanks
    165
    Thanked 1,025 Times in 818 Posts
    Quote Originally Posted by mngerhold View Post
    How did you slurp the link data?
    I just did a copy/paste of a BUILD info page into Notepad++. For example the Build Info page for 17134.48 shows like this:
    ms_urls_in_notepad++.png
    Click to enlarge

    However, the URL you used looks just as useful:
    ms_urls_in_notepad++1.png
    Click to enlarge

    Once I realised the data was separated by TABs I was able to save as TXT, import into Excel as 'Tab-limited' and remove the columns of extraneous data that I didn't need.

    Hope this helps...

  7. #6
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,106
    Thanks
    172
    Thanked 201 Times in 194 Posts
    Hi Rick, your attachment doesn't work....
    "Such fun!" - Miranda's mother

  8. #7
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    Location
    South Glos., UK
    Posts
    3,693
    Thanks
    165
    Thanked 1,025 Times in 818 Posts
    Quote Originally Posted by access-mdb View Post
    Hi Rick, your attachment doesn't work....
    Many thanks... fixed now.

  9. #8
    3 Star Lounger
    Join Date
    Dec 2009
    Location
    Surrey, UK
    Posts
    292
    Thanks
    14
    Thanked 72 Times in 62 Posts
    Quote Originally Posted by Rick Corbett View Post
    Once I realised the data was separated by TABs I was able to save as TXT, import into Excel as 'Tab-limited' and remove the columns of extraneous data that I didn't need. Hope this helps...
    Thanks, but too much work for me (and duplicates yours). Martin

  10. #9
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    Location
    South Glos., UK
    Posts
    3,693
    Thanks
    165
    Thanked 1,025 Times in 818 Posts
    Quote Originally Posted by mngerhold View Post
    Thanks, but too much work for me (and duplicates yours). Martin
    My thoughts entirely... I like lazy.

    It was just a 'hmm.. what if' situation... now discounted in favour of lazing around, reading a good book...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •