I wonder if the GetVersion function would still work if I get it directly from the Kernel32.dll. The way around this, is to use an application manifest, which is something that most Windows PowerShell scripters will not be doing. For example, an application written for Windows XP would test for that version, and even though the app would work on Windows 8.1 it would refuse to run because it was specifically checking for Windows XP. The article states that the reason for this move is that a number of applications do not get shimmed properly because of poor version checks. Sometimes a deprecated API works-other times it gives inconsistent results, as is the current case. Except, it is not actually broken, and Alexander points to the Microsoft page that shows that this API is in fact deprecated in Windows 8.1: Operating system version changes in Windows 8.1 and Windows Server 2012 R2.ĭeprecated, as you may know, means that you should quit using it because in future versions it may be removed and may no longer be supported. So it would seem that his blog post is correct. So I opened the Windows PowerShell ISE and typed the same code. He certainly wouldn't make wild accusations without backup or proof. Well, I know that Alexander is a very intelligent and careful person. The code and associated output is shown here: When I opened the Windows PowerShell console to test this, I found that it works just fine. I thought to myself, "Hmmmm, I need to test this out." In particular, he was referring to using the static OSVersion property from the System.Environment class in. I was on the Sapien blog the other night, and I ran across the following post by my friend, Alexander Riedel: Windows 8.1 breaks the version API. It absolutely rocked.Īnyway, I love Windows PowerShell so much that I spend a lot of time playing around with it. I did so because I wanted one to take with me on my five week trip to Europe. I paid the same price as everyone else does, and Istood in line to make the purchase just like everyone else does. It is not a secret that I also love Windows 8.1 especially on my Surface Pro 2.ĭisclaimer: I bought my Surface Pro 2 myself at the Microsoft Store in the mall. It is not a secret that I love Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find the version of his Windows operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |