staples Posted October 21, 2009 Share Posted October 21, 2009 @OSVersion detects WIN_VISTA For this script I need to differenciate between vista and windows 7. I have searched the forums but have been unable to find a answer. When will with @OSVersion be updated to display WIN_7? Is there another way to detect Windows 7 that you use? Link to comment Share on other sites More sharing options...
monoceres Posted October 21, 2009 Share Posted October 21, 2009 You can use GetVersionEx (that's what autoit uses internally). Do a search for GetVersionEx to get sample usage. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 21, 2009 Share Posted October 21, 2009 When will with @OSVersion be updated to display WIN_7?It already has. The stable version doesn't have it sinse it came before Win7, but the latest betas will report "WIN_7" as expected. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
KaFu Posted October 21, 2009 Share Posted October 21, 2009 Take a look here... http://www.autoitscript.com/forum/index.php?showtopic=93334&st=0&p=670497&hl=OSVersion%20vista&fromsearch=1&#entry670497 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
staples Posted October 21, 2009 Author Share Posted October 21, 2009 Thank you everybody. I will check out all three avenues. Link to comment Share on other sites More sharing options...
Raven1 Posted October 22, 2009 Share Posted October 22, 2009 I have been using this bit of code to assign the name of the OS to a variable that I can use elsewhere in my scripts. Global $nOSversion = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion") ; Assign OS version number to variable ; Assign OS name to string variable depending on OS version number Switch $nOSversion Case 6.1 Global $sOSName = "Windows 7" Case 6.0 Global $sOSName = "Windows Vista" Case 5.1 Global $sOSName = "Windows XP" Case 5.0 Global $sOSName = "Windows 2000" Case Else Global $sOSName = "Old Windows Version" EndSwitch Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now