Moderators SmOke_N Posted November 12, 2012 Moderators Share Posted November 12, 2012 (edited) I needed something to use quickly to determine the version of .Net running on the client pc.My older method of using the navigator.userAgent string from a shell object won't work anymore with the newer versions of IE installed on the clients machines so, 20 lines of quick code needed to be revised into something that would.Utilizing the information provided here: http://support.microsoft.com/kb/318785/en-us , you have the dotNetRegVersions.au3 attached below.One thing I could not do was the Win8 - 4.5 version, no test environment for that.So, those of you that would like to make it better, add to, whatever, feel free... As usual, no time taken to do headers, some day maybe ( or someone else can add them ), pretty simple calls and examples should explain it all.Example:#include "dotNetRegVersions.au3" #include <Array.au3> MsgBox(64 + 262144, "Example", ".Net exists = " & _dotNet_reg_Exists() & @CRLF) MsgBox(64 + 262144, "Example", "Version 1.1 or greater exists = " & (_dotNet_reg_VersionIsAtLeast("1.1"))) MsgBox(64 + 262144, "Example", "Version 1.1 exists = " & (_dotNet_reg_VersionExists("1.1"))) MsgBox(64 + 262144, "Example", "Version 2.0 exists = " & (_dotNet_reg_VersionExists("2.0"))) Global $ga_all = _dotNet_reg_VersionAll() _ArrayDisplay($ga_all, "All Versions") Global $ga_latest = _dotNet_reg_VersionLatest() _ArrayDisplay($ga_latest, "Latest")Changed: Most of the sub-funcs to 1 func/switch statement. Added AdmiralAlkex 4.5 msdn find ( Thanks )dotNetRegVersions.au3 Edited November 14, 2012 by SmOke_N mLipok 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
ricky Posted November 12, 2012 Share Posted November 12, 2012 Hello, you can find all version in only one funstion : Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2012 Author Moderators Share Posted November 12, 2012 Neat, thanks for that. That covers a part sure, but not all that it does and or what I needed. I could have broke it up into 1 func, and still might, but I was in a hurry and copy and paste was more appealing at the time . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 12, 2012 Share Posted November 12, 2012 One thing I could not do was the Win8 - 4.5 version, no test environment for that.According to THIS article you should be looking at Release to see if 4.5 is installed. I can confirm that it shows 378389 om Win8. Win7/.net4 doesn't have that value.Screenshot:https://dl.dropbox.com/u/18344147/Mixed%20images/dotNet%20versions.pngHello,you can find all version in only one funstion :That doesn't differentiate between v4 and v4.5 .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...
Moderators SmOke_N Posted November 12, 2012 Author Moderators Share Posted November 12, 2012 @AdmiralAlkex, thanks for that. I made changes for that as well as condensed the helper funcs, new include uploaded above. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
guinness Posted November 13, 2012 Share Posted November 13, 2012 (edited) Tested and it worked, plus I learned what I don't have on my system of .Net. Edited November 13, 2012 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 14, 2012 Author Moderators Share Posted November 14, 2012 Fixed 1.0 verification issue, added headers/change history log... see first post. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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