Check windows version from registry c# [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a problem,
How can I check the windows version from the registry in c#?
(Windows xp to windows 8.1)

Environment.OSVersion can give you that!
Read the MSDN documentation for Environment class to see all of the other things you can get from this class.

Environment.OSVersion as others stated is right way to go.
However, in case someone want to get it through registry, this can be used -
using (Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.LocalMachine
.OpenSubKey(#"SOFTWARE\Microsoft\WindowsNT\CurrentVersion"))
{
var osVersion = key.GetValue("CurrentVersion");
}
Registry for version is HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion".
Also, corresponding mapping with actual OS from here -
Operating system Version number
----------------- --------------
Windows 8 6.2
Windows Server 2012 6.2
Windows 7 6.1
Windows Server 2008 R2 6.1
Windows Server 2008 6.0
Windows Vista 6.0
Windows Server 2003 R2 5.2
Windows Server 2003 5.2
Windows XP 64-Bit Edition 5.2
Windows XP 5.1
Windows 2000 5.0

You don't need to read the registry; System.Environment.OSVersion gives you this information.

Related

How to run a C# application on WindowsNT? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
On trying to run a c# hello world program on Windows NT4 SP6a, the error message says .net dll's not found; however on trying to install .net framework 1.1 on WinNT i get an error: "Application has generated an exception that could not be handled". When i run the C# app on Windows 7 there are no issues.
Windows 7 supports the latest .NET framework whereas WinNT supports only .NET 1.1 and installing .NET 1.1 on WinNT is not straightforward.
To get over those errors, do the following:
To fix this we need to copy a folder from a Windows Server 2003 machine to WinNT machine.
Find a Windows Server 2003 machine on which .NET framework is already installed.
From the Win 2003 machine copy "Framework" folder [C:\Windows\Microsoft.NET\Framework]
Create a folder "Microsoft.NET" in WinNT machine at [C:\Winnt\Microsoft.NET]
Copy the "Framework" folder from step-3 to "Microsoft.NET" folder in WinNT machine (step-4).
Now you have [C:\Winnt\Microsoft.NET\Framework] folder structure in the WinNT machine.
Run dotnetfx.exe and the installation should complete without incident.
reference

Develop asp.net application for windows server on linux [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I use linux and I am not willing to switch to windows. I need to create asp.net application for windows server with people working with visual studio on windows. I would like to work from my linux machine. I have heard about mono. Can I get some instructions and suggestions?
Note that the application will be deployed on windows.
One way or another you are probably going to have to use Windows at some point. Even if everything runs fine under mono you will still need to check that it does on Windows.
You could set up a virtual machine on Linux running Windows, or have a separate machine for testing. If you are working in a team where someone else is responsible for most of the testing you could avoid that too.
Start by installing mono with apt-get install mono-complete. It would probably be easiest to get Visual Studio to setup the project. Hopefully you are using some form of version control, so you can push the code and pull it to your Linux machine. You can write the code on Linux in your preferred text editor and test it running under mono. Finally deploy it back to the Windows machine/VM to verify that it works as expected on your target platform.
You can check which features are currently fully, partially or not supported in mono here:
http://www.mono-project.com/docs/about-mono/compatibility/
http://www.go-mono.com/status/

How to package and install Windows 10 application on other computers [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have developed a Universal Windows Application (Windows 10). I am now to the point where I would like to package it up and deploy it to an image of Windows 10 or have it on a shared drive and have users double click an .exe and install it.
I am using Visual Studio Enterprise 2015. Does anyone have any experience doing this? If so, could you provide any type of suggestions on how I can accomplish this too?
Please, read this tutorial: How Do I Deploy a Windows 8 App to Another Device for Testing?
For Windows 10 need setup Developer Mode is Settings.
You may want to have a look at Windows Imaging and Configuration Designer (WICD) (contained in Windows Assessment and Deployment Kit (ADK) for Windows 10). With WICD you are able to create a provisioning package containing appx packages. Afterwards, distribute the provisioning package to your users/pcs.

How to develop with C# for Symbol MT2070 using old SDK / EMDK? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am (re)developing a web application that needs to interact with a mobile scanner. My client currently has several Motorola / Symbol MT2070 scanners. The software running on those scanners was written in C# using the Symbol EMDK for .Net. I am having problems getting a working development environment (I don't usually develop in C#).
I am running Windows 8.1 and using Visual Studio 2015 CE. But when I try to install the EMDK the installer fails saying it cannot find Visual Studio. The EMDK description says it needs Visual Studio 2005 or 2008 but I cannot find or buy those because VS 2015 is out.
The MT2070 scanner runs Windows CE 5.0 and uses the .Net 2.0 Compact Framework.
How can I develop software for this scanner using a modern toolchain? Is there any way to force installation of the EMDK? Any way to get the Symbol.MT2000 C# CILs another way?
Note that Zebra acquire Motorola Solutions Enterprise Business in Oct. 2014.
Latest version of Zebra's EMDK for .NET support MT2070:
EMDK for .NET
v2.9
The EMDK works only with Visual Studio 2005 SP1 and Visual Studio 2008 because these are the compilers that supports Windows CE/Windows Mobile. Newer compilers doesn't support these operative systems. So, to develop for a Windows CE v5.0 machine you can only use VS2005 SP1 or VS2008.

"hyper-v requires windows professional" creating Universal App in Visual studio 2015 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I just downloaded visual studio 2015 today and was following this tutorial:
https://msdn.microsoft.com/en-gb/library/windows/apps/dn765018.aspx
Everything was working fine until the third step where an error comes up saying that windows phone emulator can't work without hyper-v and that hyper-v needs windows professional. I understand that, because I made it a windows universal app and that my computer is not windows professional (only windows 8.1) that I can't run the emulator for windows phone. But, because I don't see myself buying another computer or the upgrade or a windows phone any time soon- how can I finish an app on visual studio and run it.
I downloaded visual studio because I was not happy with the limited options in distributing java apps and heard that c# was similar but much better in terms of distributing as an application that people can use. If I can't use visual studio without windows professional then is there any other programming language/platform that will suit me.
You can't. The emulator is actually not a real emulator. What happens is that the Windows Phone OS image is running as a virtual image on your PC. According to the comparison chart for Windows 8.1 you really need either Windows 8.1 Pro or Enterprise. As you already mentioned yourself, you will have to upgrade to Windows 8.1 Pro (most computers support Hyper-V so it may just be a limitation of your Windows version) or buy a Windows Phone.

Categories

Resources