C# How to Get Windows Version

Hi guys,
Im on a Project in WPF!
Well however I wanna check the Windows OS by MessageBox.Show(Environment.OSVersion.ToString());
I tried that on Windows 8.1 and I got as result: 6.3.9600.0
Well, on the Windows Server 2012 R2 i get the same result. I informed a little bit and found out with wikipedia:
Wikipedia Link
that Windows 8.1 and the Windows Server 2012 R2 have the same OS Version.
the same is with Windows 8 and Windows Server 2012
Is there any way to defferentiate Windows 8.1 and the Windows Server 2012 R2 resp. Windows 8 and Windows Server 2012
It would be important.
Thanks Guys!

How about this approach here:
http://stackoverflow.com/questions/6331826/get-os-version-friendly-name-in-c-sharp
public static string GetOSFriendlyName()
string result = string.Empty;
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT Caption FROM Win32_OperatingSystem");
foreach (ManagementObject os in searcher.Get())
result = os["Caption"].ToString();
break;
return result;
https://msdn.microsoft.com/en-us/library/system.management.managementobjectsearcher%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML

Similar Messages

  • How to get os version on window phone?

    how to get os version(8.0 or 8.1) on window phone?

    The problem is
    WP8.1 has many versions. Sometimes it is very helpful to know the exact version because some versions have limitations
    or bugs.
    Hong

  • How to get Windows Server 2012 trial license key?

    How to get Windows Server 2012 trial license key? I'm trying to install WinServer 2012 Trial on a VMWare Workstation 9. I'm asked for the product key during set up. If I ignore putting in the key (since I don't have one) The install fails stating no valid
    key. I tried this with Oracle's Virtual Box and the same thing happens. I tried using Majic JellyBean to find the key, but that only works on pre-installed OS. A Technet article said to use aaaa-bbbbb-ccccc-ddddd etc. in the spaces. That doesn't work either.
    Articles all over the web seem to have other people in the same boat. Please help :)

    Download the trial version from here -
    http://www.microsoft.com/en-us/server-cloud/evaluate/trial-software.aspx  It does not require a key.  If the software is asking for a key, it is not the trial copy.  Where did you get your copy?
    .:|:.:|:. tim

  • How to get window system user?

    Hi,
    How to get window system user use PL/SQL(form develope6i)?

    If you don't use Oracle database then you will have to do one of two things:
    (1) Now I'm back in the office I can check D2KWUTIL. The version I have comes with Forms6.0, so it is somewhat out of date, but it has a method called WIN_API_ENVIRONMENT.Get_Windows_Username - which works for NT/95 only, although I'm sure a later version will support more recent OS.
    (2) If that's no good then you'll have to use whatever facilities your database offers: I only know Oracle.
    I also repeat my suggestion that you try the Forms forum for additional help. This is the Database forum and so is focused on serverside Oracle PL/SQL. For your needs the Developer Suite forums are better.
    Cheers, APC

  • How to get shadow version of DTP in BI 7.0

    How to get shadow version of DTP in BI 7.0..
    while activating DTP i got error as :
    "Shadow DTP_7KU3789XP6HX9XP3NS6PZ7XAP object can not be resolved - Chain inconsistent"
    Please can you suggest me

    Check if this note is applicable :
    Note 1044054 - Correction: Shadow DTP with DataSource cannot be displayed

  • How to get windows username printed on each page irrespective of application? we have cm6030f.

    How to get windows username printed on each page irrespective of application? we have HP CM6030F.

    Hi,
    Normally, you will receive a Windows Azure Pass from your local Windows Azure team. Please try to contact your local Windows Azure contact (http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0
    Also, you could see this page
    http://www.windowsazurepass.com/AzureU/AcademicFAQ and apply the free trial azure via (http://www.windowsazurepass.com/AzureU/).
    Q: I am a student. Can I apply for a pass?                     
    A: Windows Azure Educator Grants are only for valid faculty. If your faculty has been awarded a Windows Azure Educator Grant, you will be able to get a pass through him/her for you coursework. If you are interested in learning more about Windows Azure,
    we encourage you to share these Educator Grants with your faculty or sign up for the FREE 3-month trial offer. 
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get current version of safari. without having safari browser?

    how to get current version of safari. without having safari browser?

    I don't understand the question. Safari is a browser.
    Can you elaborate on what your are trying to do that initiated the question? People may be able to come up with some other option that gets you working the away you want.
    When you respond, please post the version of the Mac OS and the version of Safari you currently have. Otherwise, people are guessing and the quailty of help you get plummets.

  • How to get the version no. for service po?

    Hi,
    How to get the version no. for service po?For material po we are getting the version from EKKO-REVNO but for service po Ekko-revno is blank.
    Regards,
    Rachel.

    Hiee,
    It is not like service PO does not have revision.
    REVNO will only exists for any document if amendment is made after releasing it. If in EKKO for all service PO revision number is blank then test if version management is active for document type
    MM->Purchasing->Version management -> External documents
    Here check for your doc type and purchase org version management is active.
    Regs,
    Appie

  • How to Get a Version of the ME

    I purchase package Adobe CS5, but Can not write in Arabic when in use photoshop or and others like .Illustrator ,Dreamweaver ,InDesign
    What is the solution?
    How to Make package Adobe CS5 write Arabic
    " How to Get a Version of the ME"

    Do you want to use an Arabic typeface in PS, or have the PS interface in Arabic?

  • Hello, I was wondering how to get a version of a PDF document? My Adobe shot down and I have not had time to save my document with the notes had been taken. When I reopened there were no notes on my paper. I have a mac book pro. Thx.

    Hello, I was wondering how to get a version of a PDF document? My Adobe shot down and I have not had time to save my document with the notes had been taken. When I reopened there were no notes on my paper. I have a macbook pro. Thx.

    Hi Erika1987,
    If you have not saved the document and Acrobat closed then it's not possible to retrieve the lost data on the pdf file.
    Regards,
    Rave

  • HDD failure, I'd like to know how to get Windows 7 back on it.

    Hello everyone, I've had a HDD issue lately, but before I move on to describe my issue, here are the specs of my notebook:
    HP Pavilion dv6-3264ca
    AMD Triple-Core CPU 2.2 Ghz
    6GB RAM
    128MB ATI Graphic Card
    750GB Toshiba HDD
    Windows 7 64-bit
    The issue:
    Recently I've had a very unfortunate HDD failure. The recovery partition wouldn't even load. I tried booting my notebook on Linux with the HDD still attached, and it wouldn't read. I extracted the HDD and placed it in an HDD-enclosuer and it still wouldn't load on Windows XP or Vista or 7. It would however read in the device manager of Windows and also in the BIOS.
    I needed to extract some high-priority data from there so I managed to retrieve all my data safely through a data recovery service, but now the drive is rendered useless. I was told a low-level format might be able to help it be usable again, and if that were to happen, the recovery partition would then be removed in the process. 
    In addition to that, I would like to install Windows 7 64-bit onto the drive, but the notebook box did not come with an installation CD, which is quite frustrating. Is there any way HP can let me download Windows 7 through some warranty service?
    I have a one-year warranty on my laptop.
    So in closing, I would like to know if I can get Windows 7 back onto my HDD for free, or if I need to go about buying Windows 7 again.
    Any advice from you kind folks?
    This question was solved.
    View Solution.

    Hi,
    Here are Two options.
    1.  If you have ( or can borrow ) a retail Windows 7 installation disc that is exactly the same version as your OEM installation - ie if your notebook came with Windows 7 Home Premium 64bit this is the exact retail version you would need.
    If you don't have access to a retail disc, you can create an installation disc yourself - just download the correct Disc Image from the link below and use an application such as ImgBurn to burn the ISO correctly to a blank DVD.
    http://www.mydigitallife.info/download-windows-7-iso-official-32-bit-and-64-bit-direct-download-link...
    Use the disc to perform the installation, enter the Windows activation key found on the underside of your notebook when requested and when the installation has completed, use the 'Phone Method' detailed in the link below to activate the OS - this method supported by Microsoft and is popular with people who just want a clean installation of Windows 7 without the additional software load normally bundled with OEM installations.
    http://www.kodyaz.com/articles/how-to-activate-windows-7-by-phone.aspx
    Any additional drivers you may need can be found Here.
    2.  You can order a replacement set of Recovery Discs using the link below - these cost around $30 if you live in the US.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&lc=en&dlc=en
    If you have any problem with this link, order them directly from HP.
    If you live in the US, contact HP Here.
    If you are in another part of the world, start Here.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How to get the version no of a document created/updated in KM

    Hi All,
    We are currently working on SAP 7.0 SP16.
    We have used the KM API to store our documents into the KM repositories.
    The problem we are facing here is related to the version no of the documents created.
    I will explain this with an example :
    I have created a document "test.txt" --> default version no is 1
    I updated the same twice now there are 3 version for this document 1, 2 & 3.
    Now if I delete the version no 1 then there are only 2 document versions remaining in the system, but the Portal still displays them as 2 and 3.
    Now when I want to read the version history of this document I get an IResource object for each version but I am not able to find any means through which I can retrieve the version no of the IResource object which is currently being read.
    Can someone please help me the information regarding how to retrieve the version no from the IResource object returned whenever a document is read using KM API.
    Thanks in advance!
    Regards,
    Manish

    Hi,
    try something like this:
    String strRevisionID = null;
    if (resource.isVersioned())  {
      IVersionHistory versions = resource.getVersionHistory();
      if (versions != null) {
        IResource version = versions.get(i);
        strRevisionID = actResource.getRevisionID();
    hope this helps,
    Romano

  • How to get the Version History of a stored document?

    Hi,
    I am trying to store and retrieve the content using Content Services features of ADEP 10.0.
    I am able to store and retrieve content where as I am not able to get the version of the document. I am trying to store same or different document, but I donot get the version history or version label. Please guide me how I can get  the version of a stored document.
    Also, please advise me if there are simple alternative to do the same in ADEP10.
    Please see below my sample code below:
    package test.sample;
    import java.io.File;
    import java.util.*;
    import com.adobe.idp.Document;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
    import com.adobe.livecycle.contentservices.client.CRCResult;
    import com.adobe.livecycle.contentservices.client.impl.DocumentManagementServiceClientImpl;
    import com.adobe.livecycle.contentservices.client.impl.UpdateVersionType;
    public class AddContent {
        public static void main(String[] args) {
            try{
                //Set connection properties required to invoke Document Services in EJB mode                                
                Properties connectionProps = new Properties();
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,Service ClientFactoryProperties.DSC_EJB_PROTOCOL);          
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
                //Create a ServiceClientFactory object
                ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
                //Create a DocumentManagementServiceClientImpl object
                DocumentManagementServiceClientImpl    docManager = new DocumentManagementServiceClientImpl(myFactory);
                //Specify the store and node name
                String storeName ="SpacesStore"; 
                String nodeName = "/Company Home/Test Directory";
                //Retrieve the document to store in /Company Home/Test Directory
                Document contentA =  new Document(new File("C://Adobe/New files/Data-A.pdf"), false);
                Document contentB =  new Document(new File("C://Adobe/New files/Data-B.txt"), false);
                Document contentC =  new Document(new File("C://Adobe/New files/Data-C.xlsx"), false);
                //Create a MAP instance to store attributes
                Map<String,Object> inputs = new HashMap<String,Object>();
                //Specify attributes that belong to the new content
                String creator = "{http://www.alfresco.org/model/content/1.0}creator";
                String description = "{http://www.alfresco.org/model/content/1.0}description"; 
                inputs.put(creator,"Veeraganteppa Sajjan");
                inputs.put(description,"A sample application form");
                //Store MortgageForm.pdf in /Company Home/Test Directory
                CRCResult resultA = docManager.storeContent(storeName, 
                         nodeName,
                        "dataA.pdf",
                        "{http://www.alfresco.org/model/content/1.0}content", 
                        contentA,
                        "UTF-8",
                        UpdateVersionType.INCREMENT_MAJOR_VERSION,
                        null,
                        inputs); 
                CRCResult resultB = docManager.storeContent(storeName, 
                        nodeName,
                       "dataB.pdf",
                       "{http://www.alfresco.org/model/content/1.0}content", 
                       contentB,
                       "UTF-8",
                       UpdateVersionType.INCREMENT_MAJOR_VERSION,
                       null,
                       inputs);
                CRCResult resultC = docManager.storeContent(storeName, 
                        nodeName,
                       "dataC",
                       "{http://www.alfresco.org/model/content/1.0}content", 
                       contentC,
                       "UTF-8",
                       UpdateVersionType.INCREMENT_MAJOR_VERSION,
                       null,
                       inputs);
                //Get the identifier value of the new resource
                String idA = resultA.getNodeUuid();
                String idB = resultB.getNodeUuid();
                String idC = resultC.getNodeUuid();
                System.out.println("A -The identifier value of the new content is "+idA);
                System.out.println("B - The identifier value of the new content is "+idB);
                System.out.println("C - The identifier value of the new content is "+idC);
               System.out.println("A - The Browse Link is "+resultA.getBrowseLink());
                System.out.println("B - The Browse Link is "+resultB.getBrowseLink());
                System.out.println("C - The Browse Link is "+resultC.getBrowseLink());
              System.out.println("A-The Version Label is "+resultA.getVersionLabel());
              System.out.println("B-The Version Label is "+resultB.getVersionLabel());
              System.out.println("C-The Version Label is "+resultC.getVersionLabel());
              System.out.println("The Version History is "+docManager.getVersionHistory(storeName,nodeName, true));
        }catch(Exception e)
            e.printStackTrace();
    Message was edited by: V B Sajjan

    Sorry I did not attach the output and errors. Please find the same below.
    A -The identifier value of the new content is f5427f5b-c7c1-4c3c-b959-cb84e4e49a13
    B - The identifier value of the new content is b237d22c-5ff5-4628-a83a-23f5e49ae48e
    C - The identifier value of the new content is 34a9992c-3705-4488-bb55-6dd7ddfa0517
    A - The Browse Link is http://localhost:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/f5427f5b-c7c 1-4c3c-b959-cb84e4e49a13/dataA.pdf
    B - The Browse Link is http://localhost:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/b237d22c-5ff 5-4628-a83a-23f5e49ae48e/dataB.pdf
    C - The Browse Link is http://localhost:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/34a9992c-370 5-4488-bb55-6dd7ddfa0517/dataC
    A-The Version Label is null
    B-The Version Label is null
    C-The Version Label is null
    ALC-CSV-30015-000: com.adobe.livecycle.contentservices.client.exceptions.CSInvocationException: ALC-CSV-030-015-The node [/Company Home/Test Directory] is not versioned.
    at com.adobe.contentservices.webscripts.impl.AbstractContentManager.doGetVersionHistory(Abst ractContentManager.java:1362)
    at com.adobe.contentservices.webscripts.impl.ContentManagerImpl.executeParams(ContentManager Impl.java:198)
    at com.adobe.contentservices.webscripts.impl.CSRetryingTransactionCallback.execute(CSRetryin gTransactionCallback.java:45)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti onHelper.java:326)
    at com.adobe.contentservices.webscripts.impl.ContentManagerImpl.execute(ContentManagerImpl.j ava:114)
    at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:333)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti onHelper.java:326)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContaine r.java:386)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContai ner.java:404)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java: 246)
    at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:294)
    at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:172)
    at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:86)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja va:183)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEs tablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEst ablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java: 158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
    at java.lang.Thread.run(Thread.java:662)

  • HOW to get Windows 7 installed on HP Pavilion 15 15-E028US 15-E1X73UA E1X73UA / E028US

    Im just posting this to save the agony i went through trying to find correct windows 7 64 Bit drivers. hopefully this will save many people time since alot of people downgrade from windows 8 to windows 7. This is how i got Windows 7 installed on the  HP Pavilion 15 15-E028US  15-E1X73UA E1X73UA / E028US notebook / laptop .
    I installed the following drivers in the FOLLOWING ORDER: i only reason i would install in the following ordre is because i had problems installing the USB 3.0 drivers, but if you install in this order the USB 3.0 drivers should install fine. 
    NOTE: i tried this with the 64 bit version of win7 and it worked fine, i didnt have time to try with 32 bit win7.
    1) AMD CHIPSET DRIVERS
    http://support.amd.com/us/gpudownload/windows/Pages/raid_windows.aspx#2 and download 
    http://www2.ati.com/drivers/13-4_vista_win7_win8_32-64_sb.exe
    2)  AMD Catalyst Notebook Display Driver ( Radeon HD 8450G )
    http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx and download
    http://www2.ati.com/drivers/beta/amd_catalyst_13.10_mobility_beta.exe
    3) ETHERNET CONTROLLER - Realtek Ethernet Controller Driver
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=32... and download sp61473.exe
    4) NETWORK CONTROLLER - Realtek RTL8188EE 802.11b/g/n Wireless LAN Driver
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=32... and download sp61518.exe
    5) PCI DEVICE - Realtek PCIe Media Card Reader Driver 
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=32... and download sp61420.exe
    6) UKNOWN DEVICE - HP 3D DriveGuard Software
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-117749-1&cc=us&dlc=en&lc=en... and download 
    sp61291.exe
    REBOOT YOUR MACHINE AT THIS POINT before installing the USB drivers below
    7) AND FINALLY THE  USB CONTOLLER AMD USB 3.0 Host Controller Driver (just put checkmarks next to the USB drivers (32bit & 64bit)
    http://download.lenovo.com/consumer/mobiles/acpvga118w7.exe
    This below is just for reference of my Device ID for the USB HOST CONTROLLER
    PCI\VEN_1022&DEV_7814&SUBSYS_1982103C&REV_09
    PCI\VEN_1022&DEV_7814&SUBSYS_1982103C
    PCI\VEN_1022&DEV_7814&CC_0C0330
    PCI\VEN_1022&DEV_7814&CC_0C03
    keywords: downgrade windows7 notebook laptop E1X73UA/E028US

    youre very welcome, thanks for taking the time to say thanks!! just trying to help few peeps  out

  • How to get windows 7 on mac

    Hello I have bought my Macbook Pro 13" 2 weeks ago how install i windows 7 on it what do i need to install windows 7??

    hans_k wrote:
    So i need copy disk of windows 7 ISO image
    You know where I can get windows 7 ISO Image??
    You buy it, try Amazon.

Maybe you are looking for