Browse Source

Automatic Commit By liuyuqi

lqg 2 years ago
commit
1224552e7a

+ 2 - 0
.gitattributes

@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto

+ 34 - 0
.github/ISSUE_TEMPLATE/bug_report.md

@@ -0,0 +1,34 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**PC Information (please complete the following information):**
+ - CPU Arch: [e.g. x86/x64/ARM64]
+ - Windows Version: [e.g. Windows 10 10.0.10240.0]
+ - Original SKU: [e.g. Home/Pro/Education etc.]
+ - Target SKU: [e.g. Home/Pro/Education etc.]
+ - Version [e.g. 2.6.2.0]
+
+**Additional context**
+Add any other context about the problem here.

+ 398 - 0
.gitignore

@@ -0,0 +1,398 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.tlog
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# Visual Studio History (VSHistory) files
+.vshistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml

+ 25 - 0
CmwtatDigital.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27130.2036
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmwtatDigital", "CmwtatDigital\CmwtatDigital.csproj", "{961DE925-B82C-4515-8FBD-6805E36D1212}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{961DE925-B82C-4515-8FBD-6805E36D1212}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{961DE925-B82C-4515-8FBD-6805E36D1212}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{961DE925-B82C-4515-8FBD-6805E36D1212}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{961DE925-B82C-4515-8FBD-6805E36D1212}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {653ED007-6FEF-4A82-9898-F60578205F1C}
+	EndGlobalSection
+EndGlobal

+ 18 - 0
CmwtatDigital/App.xaml

@@ -0,0 +1,18 @@
+<Application x:Class="CmwtatDigital.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:CMWTAT_KMS"
+             StartupUri="MainWindow.xaml"
+             >
+    <Application.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Pink.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
+                <ResourceDictionary Source="Lang/en.xaml"/>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </Application.Resources>
+</Application>

+ 17 - 0
CmwtatDigital/App.xaml.cs

@@ -0,0 +1,17 @@
+using CmwtatDigital;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace CMWTAT_KMS
+{
+    /// <summary>
+    /// App.xaml 的交互逻辑
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

BIN
CmwtatDigital/CMWTAT.ico


BIN
CmwtatDigital/CMWTAT.png


+ 201 - 0
CmwtatDigital/CmwtatDigital.csproj

@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{961DE925-B82C-4515-8FBD-6805E36D1212}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>CmwtatDigital</RootNamespace>
+    <AssemblyName>CmwtatDigital</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <TargetFrameworkProfile />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationManifest>app.manifest</ApplicationManifest>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>CMWTAT.ico</ApplicationIcon>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>CmwtatDigital.Program</StartupObject>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="LibGatherOsState, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>Res\LibGatherOsState.dll</HintPath>
+    </Reference>
+    <Reference Include="MaterialDesignColors, Version=2.0.6.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MaterialDesignColors.2.0.6\lib\net452\MaterialDesignColors.dll</HintPath>
+    </Reference>
+    <Reference Include="MaterialDesignThemes.Wpf, Version=4.5.0.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MaterialDesignThemes.4.5.0\lib\net452\MaterialDesignThemes.Wpf.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Runtime" />
+    <Reference Include="System.Runtime.InteropServices.WindowsRuntime" />
+    <Reference Include="System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="Windows.Data" />
+    <Reference Include="Windows.Foundation" />
+    <Reference Include="Windows.UI" />
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="Lang\en.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Lang\ja.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Lang\zh.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Domain\IsSN.cs" />
+    <Compile Include="Domain\NotifyPropertyChangedExtension.cs" />
+    <Compile Include="Domain\ViewModel.cs" />
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="OSVersionInfoClass.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <None Include="app.config" />
+    <None Include="app.manifest">
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="CMWTAT.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="..\packages\MaterialDesignColors.2.0.6\lib\net452\MaterialDesignColors.dll">
+      <Link>Res\MaterialDesignColors.dll</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\packages\MaterialDesignThemes.4.5.0\lib\net452\MaterialDesignThemes.Wpf.dll">
+      <Link>Res\MaterialDesignThemes.Wpf.dll</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll">
+      <Link>Res\Newtonsoft.Json.dll</Link>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\slmgr.vbs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="bin\Debug\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="Lang\fr.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Res\ClipUp.exe" />
+    <EmbeddedResource Include="Res\LibGatherOsState.dll" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\packages\MaterialDesignThemes.4.5.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.5.0\build\MaterialDesignThemes.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\MaterialDesignThemes.4.5.0\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.4.5.0\build\MaterialDesignThemes.targets'))" />
+  </Target>
+</Project>

+ 82 - 0
CmwtatDigital/Domain/IsSN.cs

@@ -0,0 +1,82 @@
+using System;
+using System.Globalization;
+using System.Text.RegularExpressions;
+using System.Windows.Controls;
+
+namespace CmwtatDigital.Domain
+{
+    class IsSN : ValidationRule
+    {
+        #region 匹配方法  
+
+        /// <summary>  
+        /// 验证字符串是否匹配正则表达式描述的规则  
+        /// </summary>  
+        /// <param name="inputStr">待验证的字符串</param>  
+        /// <param name="patternStr">正则表达式字符串</param>  
+        /// <returns>是否匹配</returns>  
+        public static bool IsMatch(string inputStr, string patternStr)
+        {
+            return IsMatch(inputStr, patternStr, false, false);
+        }
+
+        /// <summary>  
+        /// 验证字符串是否匹配正则表达式描述的规则  
+        /// </summary>  
+        /// <param name="inputStr">待验证的字符串</param>  
+        /// <param name="patternStr">正则表达式字符串</param>  
+        /// <param name="ifIgnoreCase">匹配时是否不区分大小写</param>  
+        /// <returns>是否匹配</returns>  
+        public static bool IsMatch(string inputStr, string patternStr, bool ifIgnoreCase)
+        {
+            return IsMatch(inputStr, patternStr, ifIgnoreCase, false);
+        }
+
+        /// <summary>  
+        /// 验证字符串是否匹配正则表达式描述的规则  
+        /// </summary>  
+        /// <param name="inputStr">待验证的字符串</param>  
+        /// <param name="patternStr">正则表达式字符串</param>  
+        /// <param name="ifIgnoreCase">匹配时是否不区分大小写</param>  
+        /// <param name="ifValidateWhiteSpace">是否验证空白字符串</param>  
+        /// <returns>是否匹配</returns>  
+        public static bool IsMatch(string inputStr, string patternStr, bool ifIgnoreCase, bool ifValidateWhiteSpace)
+        {
+            if (!ifValidateWhiteSpace && string.IsNullOrEmpty(inputStr))
+                return false;//如果不要求验证空白字符串而此时传入的待验证字符串为空白字符串,则不匹配  
+            Regex regex = null;
+            if (ifIgnoreCase)
+                regex = new Regex(patternStr, RegexOptions.IgnoreCase);//指定不区分大小写的匹配  
+            else
+                regex = new Regex(patternStr);
+            return regex.IsMatch(inputStr);
+        }
+
+        #endregion
+
+        public override ValidationResult Validate(object value, CultureInfo cultureInfo)
+        {
+            //Console.WriteLine("\""+value+"\"");
+            //return string.IsNullOrWhiteSpace((value ?? "").ToString())
+            //    ? new ValidationResult(false, "Key is required.")
+            //    : ValidationResult.ValidResult;
+
+            string pattern = @"^[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}$";
+
+            if (IsMatch((value ?? "").ToString(), pattern))
+            {
+                return ValidationResult.ValidResult;
+
+            }
+            else if (string.IsNullOrWhiteSpace((value ?? "").ToString()))
+            {
+                return new ValidationResult(false, "Please enter the key for the current edition.");
+            }
+            else
+            {
+                return new ValidationResult(false, "Invalid format.");
+            }
+
+        }
+    }
+}

+ 20 - 0
CmwtatDigital/Domain/NotifyPropertyChangedExtension.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CmwtatDigital.Domain
+{
+    public static class NotifyPropertyChangedExtension
+    {
+        public static void MutateVerbose<TField>(this INotifyPropertyChanged instance, ref TField field, TField newValue, Action<PropertyChangedEventArgs> raise, [CallerMemberName] string propertyName = null)
+        {
+            if (EqualityComparer<TField>.Default.Equals(field, newValue)) return;
+            field = newValue;
+            raise?.Invoke(new PropertyChangedEventArgs(propertyName));
+        }
+    }
+}

+ 37 - 0
CmwtatDigital/Domain/ViewModel.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CmwtatDigital.Domain
+{
+    class ViewModel : INotifyPropertyChanged
+    {
+        private string _sn;
+
+        public ViewModel()
+        {
+            LongListToTestComboVirtualization = new List<int>(Enumerable.Range(0, 1000));
+        }
+
+        public string SN
+        {
+            get { return _sn; }
+            set
+            {
+                this.MutateVerbose(ref _sn, value, RaisePropertyChanged());
+            }
+        }
+
+        public IList<int> LongListToTestComboVirtualization { get; }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private Action<PropertyChangedEventArgs> RaisePropertyChanged()
+        {
+            return args => PropertyChanged?.Invoke(this, args);
+        }
+    }
+}

+ 225 - 0
CmwtatDigital/Lang/en.xaml

@@ -0,0 +1,225 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <!--
+    Version: 2.6.0.0
+    -->
+
+    <!--FontFamily Dictionary-->
+    
+    <FontFamily x:Key="Font">
+        Roboto
+    </FontFamily>
+    
+    <!--String Dictionary-->
+    
+    <sys:String x:Key="OK">
+        OK
+    </sys:String>
+    <sys:String x:Key="Cancel">
+        Cancel
+    </sys:String>
+    <sys:String x:Key="Refuse">
+        Refuse
+    </sys:String>
+    <sys:String x:Key="DonateBtn">
+        Thanks developer and donate a dinner
+    </sys:String>
+    <sys:String x:Key="Exit">
+        Exit
+    </sys:String>
+    <sys:String x:Key="UpdateNow">
+        Update Now
+    </sys:String>
+    <sys:String x:Key="Ignore">
+        Ignore
+    </sys:String>
+    <sys:String x:Key="TitleName">
+        CMWTAT Digital Edition
+    </sys:String>
+    <sys:String x:Key="AppName">
+        CMWTAT Digital Edition V2
+    </sys:String>
+    <sys:String x:Key="UpdateTitle">
+        A new version available!
+    </sys:String>
+    <sys:String x:Key="UpgradeFullVersionWindowsTitle">
+        Upgrade to full version of Windows
+    </sys:String>
+    <sys:String x:Key="CurrentVersion">
+        Current Version
+    </sys:String>
+    <sys:String x:Key="LatestVersion">
+        Latest Version
+    </sys:String>
+    <sys:String x:Key="Auto_Mode">
+        Auto Mode
+    </sys:String>
+    <sys:String x:Key="Manual_Mode">
+        Manual Mode
+    </sys:String>
+    <sys:String x:Key="Activate_Button">
+        Activate
+    </sys:String>
+    <sys:String x:Key="Convert_versions">
+        Convert versions (Install Key without Activate)
+    </sys:String>
+    <sys:String x:Key="Upgrade_full_version">
+        Upgrade to full version of Windows
+    </sys:String>
+    <sys:String x:Key="test">
+        Test Text
+    </sys:String>
+    <sys:String x:Key="Loading">
+        Loading
+    </sys:String>
+    <sys:String x:Key="Activating">
+        Activating
+    </sys:String>
+    <sys:String x:Key="Complete">
+        Complete
+    </sys:String>
+    <sys:String x:Key="notifyIconTitle">
+        CloudMoe Windows 10+ Activation Toolkit V2
+    </sys:String>
+    <sys:String x:Key="Running">
+        Running.
+    </sys:String>
+    <sys:String x:Key="Experimental">
+        Experimental
+    </sys:String>
+    <sys:String x:Key="Attention">
+        Attention
+    </sys:String>
+    <sys:String x:Key="System_Edition">
+        System edition
+    </sys:String>
+    <sys:String x:Key="May_be_not_be_supported">
+        Unable to correctly identify your operating system edition in support list, may be not be supported.
+    </sys:String>
+    <sys:String x:Key="Only_find_experimental">
+        Only found experimental options that can be used with this operating system edition, little hope of activation success.
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_try">
+        Your system edition may not be supported, program will exit. you can try add --expact or -e to startup.
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_exit">
+        Your system edition may not be supported, program will exit.
+    </sys:String>
+    <sys:String x:Key="notify_Disconnect_to_server_exit">
+        Unable to connect to server, Please check the network and try to try again later, program will exit.
+    </sys:String>
+    <sys:String x:Key="Disconnect_to_server_exit">
+        Unable to connect to server, Please check the network and try to try again later, program will exit.
+    </sys:String>
+    <sys:String x:Key="RunInstall_Converting">
+        Converting
+    </sys:String>
+    <sys:String x:Key="RunAct_Activating">
+        Activating
+    </sys:String>
+    <sys:String x:Key="RunInstall_Getting_Key">
+        Getting Key via Internet
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_Key">
+        Getting Key via Internet
+    </sys:String>
+    <sys:String x:Key="RunInstall_Uninstalling_old_Key">
+        Uninstalling old Key
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key">
+        Uninstalling old Key
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key_Exp">
+        Uninstalling old Key (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunInstall_Installing_Key">
+        Installing Key
+    </sys:String>
+    <sys:String x:Key="RunAct_Installing_Key">
+        Installing Key
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_edition_code_Exp">
+        Getting edition code (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunAct_Prepare_for_the_next_step_Exp">
+        Prepare for the next step (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunAct_Writing_old_OS">
+        Writing feature of old Windows version
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_free_upgrade_permissions">
+        Getting free upgrade permissions
+    </sys:String>
+    <sys:String x:Key="RunAct_Cleaning_changes">
+        Cleaning changes
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_digital_license">
+        Getting digital license
+    </sys:String>
+    <sys:String x:Key="RunUpgradeFullVersion_Upgrading">
+        Upgrading
+    </sys:String>
+    <sys:String x:Key="CompleteTitle">
+        Complete
+    </sys:String>
+    <sys:String x:Key="ErrorTitle">
+        Error
+    </sys:String>
+    <sys:String x:Key="ErrorCode">
+        Code:
+    </sys:String>
+    <sys:String x:Key="SysMsg">
+        System return:
+    </sys:String>
+
+    <!--
+        Attention:
+        DO NOT USE ANY Indentation in Preserve Mode, Please!
+    -->
+
+    <sys:String x:Key="UpgradeFullVersionWindowsText" xml:space="preserve">
+You are currently using the core version of Windows, you can use this feature to upgrade to the full version of Windows.&#10;(If the operation does not respond it may be that the current version does not support the upgrade or is in the process of upgrading) &#10;&#10;Note:&#10;This operation is not reversible and once the upgrade is complete you will not be able to roll back to the core version of Windows!&#10;&#10;Are you sure you want to perform an upgrade?
+    </sys:String>
+    <sys:String x:Key="HelpText" xml:space="preserve">
+This application now supports the use of console args to startup!&#10;&#10;-a&#9;--auto&#9;&#9;Auto activate.&#10;-h&#9;--hide&#9;&#9;Run with hide mode (Only be worked with -auto).&#10;-e&#9;--expact&#9;&#9;Experimental activation.&#10;-l&#9;--log&#9;&#9;Output log to file.&#10;-?&#9;--help&#9;&#9;Show this help Dialog.
+    </sys:String>
+    <sys:String x:Key="DonateTextConverted" xml:space="preserve">
+Congratulation! &#10;&#10;Windows has been successful converted.
+    </sys:String>
+    <sys:String x:Key="DonateTextActivated" xml:space="preserve">
+Congratulation! &#10;&#10;Windows has been successful activated.
+    </sys:String>
+    <sys:String x:Key="UpdateText" xml:space="preserve">
+We found a new version for CloudMoe Windows 10+ Activation Toolkit Digital Edition.&#10;Please update to the latest version to make sure it works.
+    </sys:String>
+    <sys:String x:Key="UpdateMustText" xml:space="preserve">
+We found a new version for CloudMoe Windows 10+ Activation Toolkit Digital Edition.&#10;And because your version is too old, so you MUST update to the latest version to make sure it works.
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-0" xml:space="preserve">
+Activate Windows requires a network to gets the product key :)
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1" xml:space="preserve">
+Cannot to uninstall old key. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.1" xml:space="preserve">
+Cannot to install key, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.2" xml:space="preserve">
+Cannot to get edition code. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-2" xml:space="preserve">
+Cannot to install key, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-3" xml:space="preserve">
+Time out, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-4" xml:space="preserve">
+Activation Failed. :( &#10;Maybe: &#10;1.This edition/version of Windows does not support digital license activation. &#10;2. Unable to connect to Microsoft Windows Activation Server. &#10;3. Other unexpected problems. &#10;&#10;You can try to wait a minute or try again later. &#10;
+    </sys:String>
+    <sys:String x:Key="Only_find_ltok" xml:space="preserve">
+Only found Long-Term Offline KMS (LTOK) options that can be used with this operating system edition. &#10;This means that it will not be activate automatically after you reinstalled the system. &#10;But don't worry, this is different from the legacy KMS activation method (it can keep activating for 180 days in offline environment). &#10;LTOK (The prefix is Offline-KMS) can keep activating for up to 2038 even it is without networking!
+    </sys:String>
+    <sys:String x:Key="DonateTextWillActivated" xml:space="preserve">
+Congratulation! &#10;&#10;Windows is ready to activate. &#10;However, it seems that Windows cannot connect to the Microsoft Activation Server.&#10;Your system will be activated automatically the next time the server is connected.
+    </sys:String>
+</ResourceDictionary>

+ 216 - 0
CmwtatDigital/Lang/fr.xml

@@ -0,0 +1,216 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <!--
+    Version: 2.5.0.0
+    -->
+
+    <!--FontFamily Dictionary-->
+    
+    <FontFamily x:Key="Font">
+        Roboto
+    </FontFamily>
+    
+    <!--String Dictionary-->
+    
+    <sys:String x:Key="OK">
+        Ok
+    </sys:String>
+    <sys:String x:Key="Cancel">
+        Annuler
+    </sys:String>
+    <sys:String x:Key="Refuse">
+        Refuser
+    </sys:String>
+    <sys:String x:Key="DonateBtn">
+        Remerciez les développeurs et offrez leurs un café
+    </sys:String>
+    <sys:String x:Key="Exit">
+        Sortir
+    </sys:String>
+    <sys:String x:Key="UpdateNow">
+        Mettre à jour maintenant
+    </sys:String>
+    <sys:String x:Key="Ignore">
+        Ignorer
+    </sys:String>
+    <sys:String x:Key="TitleName">
+        CMWTAT Edition numérique
+    </sys:String>
+    <sys:String x:Key="AppName">
+        CMWTAT Edition numérique V2
+    </sys:String>
+    <sys:String x:Key="UpdateTitle">
+        Une nouvelle version disponible !
+    </sys:String>
+    <sys:String x:Key="CurrentVersion">
+        Version actuelle
+    </sys:String>
+    <sys:String x:Key="LatestVersion">
+        Dernière version
+    </sys:String>
+    <sys:String x:Key="Auto_Mode">
+        Mode automatique
+    </sys:String>
+    <sys:String x:Key="Manual_Mode">
+        Mode manuel
+    </sys:String>
+    <sys:String x:Key="Activate_Button">
+        Activer
+    </sys:String>
+    <sys:String x:Key="Convert_versions">
+        Convertir la versions (Installer la clé sans l'activer)
+    </sys:String>
+    <sys:String x:Key="test">
+        Texte de test
+    </sys:String>
+    <sys:String x:Key="Loading">
+        Chargement
+    </sys:String>
+    <sys:String x:Key="Activating">
+        Activation
+    </sys:String>
+    <sys:String x:Key="Complete">
+        Terminé
+    </sys:String>
+    <sys:String x:Key="notifyIconTitle">
+        CloudMoe Windows 10+ Activation Toolkit V2
+    </sys:String>
+    <sys:String x:Key="Running">
+        En cours d'exécution.
+    </sys:String>
+    <sys:String x:Key="Experimental">
+        Expérimental
+    </sys:String>
+    <sys:String x:Key="Attention">
+        Attention
+    </sys:String>
+    <sys:String x:Key="System_Edition">
+        Version du système
+    </sys:String>
+    <sys:String x:Key="May_be_not_be_supported">
+        La version de votre système d'exploitation n'est pas identifiable, il se peut qu'il ne soit pas supporté.
+    </sys:String>
+    <sys:String x:Key="Only_find_experimental">
+        Seules des options expérimentales peuvent être utilisées avec cette édition du système d'exploitation. Il y a peu d'espoir de succès d'activation.
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_try">
+        La version de votre système peut ne pas être supportée, le programme se terminera automatiquement. Vous pouvez essayer d'ajouter --expact ou -e au démarrage.
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_exit">
+        La version de votre système peut ne pas être prise en charge, le programme va se fermer.
+    </sys:String>
+    <sys:String x:Key="notify_Disconnect_to_server_exit">
+        Impossible de se connecter au serveur, Veuillez vérifier le réseau et réessayer plus tard, le programme va se fermer.
+    </sys:String>
+    <sys:String x:Key="Disconnect_to_server_exit">
+        Impossible de se connecter au serveur, Veuillez vérifier le réseau et réessayer plus tard, le programme va se fermer.
+    </sys:String>
+    <sys:String x:Key="RunInstall_Converting">
+        Conversion
+    </sys:String>
+    <sys:String x:Key="RunAct_Activating">
+        Activation
+    </sys:String>
+    <sys:String x:Key="RunInstall_Getting_Key">
+        Obtention de la clé par Internet
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_Key">
+        Obtention de la clé par Internet
+    </sys:String>
+    <sys:String x:Key="RunInstall_Uninstalling_old_Key">
+        Suppression de l'ancienne clé
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key">
+        Suppression de l'ancienne clé
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key_Exp">
+        Suppression de l'ancienne clé (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunInstall_Installing_Key">
+       Installation de la clé
+    </sys:String>
+    <sys:String x:Key="RunAct_Installing_Key">
+        Installation de la clé
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_edition_code_Exp">
+        Obtenir le code version (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunAct_Prepare_for_the_next_step_Exp">
+        Préparation à l'étape suivante (Experimental)
+    </sys:String>
+    <sys:String x:Key="RunAct_Writing_old_OS">
+        Écriture d'une ancienne version de Windows
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_free_upgrade_permissions">
+        Obtention des autorisations gratuite de mise à niveau
+    </sys:String>
+    <sys:String x:Key="RunAct_Cleaning_changes">
+        Nettoyage des changements
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_digital_license">
+        Obtention d'une licence numérique
+    </sys:String>
+    <sys:String x:Key="CompleteTitle">
+        Terminé
+    </sys:String>
+    <sys:String x:Key="ErrorTitle">
+        Erreur
+    </sys:String>
+    <sys:String x:Key="ErrorCode">
+        Code:
+    </sys:String>
+    <sys:String x:Key="SysMsg">
+        Le système à retourné:
+    </sys:String>
+
+    <!--
+        Attention:
+        DO NOT USE ANY Indentation in Preserve Mode, Please!
+    -->
+   <!--
+        TODO: Finish the above translation
+    -->
+
+    <sys:String x:Key="HelpText" xml:space="preserve">
+This application now supports the use of console args to startup!&#10;&#10;-a&#9;--auto&#9;&#9;Auto activate.&#10;-h&#9;--hide&#9;&#9;Run with hide mode (Only be worked with -auto).&#10;-e&#9;--expact&#9;&#9;Experimental activation.&#10;-l&#9;--log&#9;&#9;Output log to file.&#10;-?&#9;--help&#9;&#9;Show this help Dialog.
+    </sys:String>
+    <sys:String x:Key="DonateTextConverted" xml:space="preserve">
+Congratulation! &#10;&#10;Windows has been successful converted.
+    </sys:String>
+    <sys:String x:Key="DonateTextActivated" xml:space="preserve">
+Congratulation! &#10;&#10;Windows has been successful activated.
+    </sys:String>
+    <sys:String x:Key="UpdateText" xml:space="preserve">
+We found a new version for CloudMoe Windows 10+ Activation Toolkit Digital Edition.&#10;Please update to the latest version to make sure it works.
+    </sys:String>
+    <sys:String x:Key="UpdateMustText" xml:space="preserve">
+We found a new version for CloudMoe Windows 10+ Activation Toolkit Digital Edition.&#10;And because your version is too old, so you MUST update to the latest version to make sure it works.
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-0" xml:space="preserve">
+Activate Windows requires a network to gets the product key :)
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1" xml:space="preserve">
+Cannot to uninstall old key. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.1" xml:space="preserve">
+Cannot to install key, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.2" xml:space="preserve">
+Cannot to get edition code. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-2" xml:space="preserve">
+Cannot to install key, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-3" xml:space="preserve">
+Time out, may be you choose or enter a incorrect version. :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-4" xml:space="preserve">
+Activation Failed. :( &#10;Maybe: &#10;1.This edition/version of Windows does not support digital license activation. &#10;2. Unable to connect to Microsoft Windows Activation Server. &#10;3. Other unexpected problems. &#10;&#10;You can try to wait a minute or try again later. &#10;
+    </sys:String>
+    <sys:String x:Key="Only_find_ltok" xml:space="preserve">
+Only found Long-Term Offline KMS (LTOK) options that can be used with this operating system edition. &#10;This means that it will not be activate automatically after you reinstalled the system. &#10;But don't worry, this is different from the legacy KMS activation method (it can keep activating for 180 days in offline environment). &#10;LTOK (The prefix is Offline-KMS) can keep activating for up to 2038 even it is without networking!
+    </sys:String>
+    <sys:String x:Key="DonateTextWillActivated" xml:space="preserve">
+Congratulation! &#10;&#10;Windows is ready to activate. &#10;However, it seems that Windows cannot connect to the Microsoft Activation Server.&#10;Your system will be activated automatically the next time the server is connected.
+    </sys:String>
+</ResourceDictionary>

+ 229 - 0
CmwtatDigital/Lang/ja.xaml

@@ -0,0 +1,229 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <!--
+    Version: 2.6.0.0
+    -->
+
+    <!--FontFamily Dictionary-->
+    
+    <FontFamily x:Key="Font">
+        Yu Gothic UI
+    </FontFamily>
+    
+    <!--String Dictionary-->
+    
+    <sys:String x:Key="OK">
+        はい
+    </sys:String>
+    <sys:String x:Key="Cancel">
+        キャンセル
+    </sys:String>
+    <sys:String x:Key="Refuse">
+        リフューズ
+    </sys:String>
+    <sys:String x:Key="DonateBtn">
+        寄付します
+    </sys:String>
+    <sys:String x:Key="Exit">
+        終了
+    </sys:String>
+    <sys:String x:Key="UpdateNow">
+        今すぐアップデート
+    </sys:String>
+    <sys:String x:Key="Ignore">
+        無視する
+    </sys:String>
+    <sys:String x:Key="TitleName">
+        雲萌 10+ デジタルライセンス認証アプリ
+    </sys:String>
+    <sys:String x:Key="AppName">
+        CMWTAT Digital Edition V2
+    </sys:String>
+    <sys:String x:Key="UpdateTitle">
+        新しいバージョンがあります!
+    </sys:String>
+    <!-- TODO -->
+    <sys:String x:Key="UpgradeFullVersionWindowsTitle">
+        Upgrade to full version of Windows
+    </sys:String>
+    <sys:String x:Key="CurrentVersion">
+        バージョン
+    </sys:String>
+    <sys:String x:Key="LatestVersion">
+        ラストバージョン
+    </sys:String>
+    <sys:String x:Key="Auto_Mode">
+        オートモード
+    </sys:String>
+    <sys:String x:Key="Manual_Mode">
+        マニュアルモード
+    </sys:String>
+    <sys:String x:Key="Activate_Button">
+        認証
+    </sys:String>
+    <sys:String x:Key="Convert_versions">
+        エディション変換 (キーをインストールするが、認証しません)
+    </sys:String>
+    <!-- TODO -->
+    <sys:String x:Key="Upgrade_full_version">
+        Upgrade to full version of Windows
+    </sys:String>
+    <sys:String x:Key="test">
+        テストテキスト
+    </sys:String>
+    <sys:String x:Key="Loading">
+        ローディング
+    </sys:String>
+    <sys:String x:Key="Activating">
+        認証中
+    </sys:String>
+    <sys:String x:Key="Complete">
+        コンプリート
+    </sys:String>
+    <sys:String x:Key="notifyIconTitle">
+        雲萌 Windows 10+ 認証アプリ V2
+    </sys:String>
+    <sys:String x:Key="Running">
+        実行中。
+    </sys:String>
+    <sys:String x:Key="Experimental">
+        実験性
+    </sys:String>
+    <sys:String x:Key="Attention">
+        注意
+    </sys:String>
+    <sys:String x:Key="System_Edition">
+        システムエディション
+    </sys:String>
+    <sys:String x:Key="May_be_not_be_supported">
+        あなたのシステムエディションが判別できません、対応していないかもしれません。
+    </sys:String>
+    <sys:String x:Key="Only_find_experimental">
+        このシステムエディションに実験性オプションしか取れません、認証成功の可能性は極めて低い。
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_try">
+        あなたのシステムエディションは対応していないかもしれません。アプリは終了する。試して、--expactまたは-eを追加することでアプリ起動してください。
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_exit">
+        あなたのシステムエディションは対応していないかもしれません。アプリは終了する。
+    </sys:String>
+    <sys:String x:Key="notify_Disconnect_to_server_exit">
+        サーバーに接続できません、インターネット接続を確認するまたは後で試してください、アプリは終了します。
+    </sys:String>
+    <sys:String x:Key="Disconnect_to_server_exit">
+        サーバーに接続できません、インターネット接続を確認するまたは後で試してください、アプリは終了します。
+    </sys:String>
+    <sys:String x:Key="RunInstall_Converting">
+        変換中
+    </sys:String>
+    <sys:String x:Key="RunAct_Activating">
+        ライセンス認証中
+    </sys:String>
+    <sys:String x:Key="RunInstall_Getting_Key">
+        インターネットを通じてキーを取得しています
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_Key">
+        インターネットを通じてキーを取得しています
+    </sys:String>
+    <sys:String x:Key="RunInstall_Uninstalling_old_Key">
+        以前のキーをアンインストールしています
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key">
+        以前のキーをアンインストールしています
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key_Exp">
+        以前のキーをアンインストールしています(実験性)
+    </sys:String>
+    <sys:String x:Key="RunInstall_Installing_Key">
+        キーをインストールしています
+    </sys:String>
+    <sys:String x:Key="RunAct_Installing_Key">
+        キーをインストールしています
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_edition_code_Exp">
+        エディションコードを取得中(実験性)
+    </sys:String>
+    <sys:String x:Key="RunAct_Prepare_for_the_next_step_Exp">
+        次のステップに準備しています(実験性)
+    </sys:String>
+    <sys:String x:Key="RunAct_Writing_old_OS">
+        旧システムの特徴を書き込み中
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_free_upgrade_permissions">
+        無償アップグレード権限を取得中
+    </sys:String>
+    <sys:String x:Key="RunAct_Cleaning_changes">
+        変更がクリーンアップされます
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_digital_license">
+        デジタルライセンスを取得中
+    </sys:String>
+    <!-- TODO -->
+    <sys:String x:Key="RunUpgradeFullVersion_Upgrading">
+        Upgrading
+    </sys:String>
+    <sys:String x:Key="CompleteTitle">
+        コンプリート
+    </sys:String>
+    <sys:String x:Key="ErrorTitle">
+        エラー
+    </sys:String>
+    <sys:String x:Key="ErrorCode">
+        コード:
+    </sys:String>
+    <sys:String x:Key="SysMsg">
+        システムメッセージ:
+    </sys:String>
+
+    <!--
+        Attention:
+        DO NOT USE ANY Indentation in Preserve Mode, Please!
+    -->
+
+    <!-- TODO -->
+    <sys:String x:Key="UpgradeFullVersionWindowsText" xml:space="preserve">
+You are currently using the core version of Windows, you can use this feature to upgrade to the full version of Windows.&#10;(If the operation does not respond it may be that the current version does not support the upgrade or is in the process of upgrading) &#10;&#10;Note:&#10;This operation is not reversible and once the upgrade is complete you will not be able to roll back to the core version of Windows!&#10;&#10;Are you sure you want to perform an upgrade?
+    </sys:String>
+    <sys:String x:Key="HelpText" xml:space="preserve">
+このアプリは起動時にコンソール引数を使用できるようになりました!&#10;&#10;-a&#9;--auto&#9;&#9;自動認証。&#10;-h&#9;--hide&#9;&#9;非表示モードで実行 (-autoと一緒に使用するだけ可能)。&#10;-e&#9;--expact&#9;&#9;実験性認証。&#10;-l&#9;--log&#9;&#9;ログをファイルに出力。&#10;-?&#9;--help&#9;&#9;この説明ダイアログボックスを表示する。
+    </sys:String>
+    <sys:String x:Key="DonateTextConverted" xml:space="preserve">
+おめでとう! &#10;&#10;Windows エディション変換成功。
+    </sys:String>
+    <sys:String x:Key="DonateTextActivated" xml:space="preserve">
+おめでとう! &#10;&#10;Windows 認証成功。
+    </sys:String>
+    <sys:String x:Key="UpdateText" xml:space="preserve">
+雲萌 Windows 10+ デジタルライセンス認証アプリの新しいバージョン発見しました。&#10;最新バージョンにアップデートしてください。
+    </sys:String>
+    <sys:String x:Key="UpdateMustText" xml:space="preserve">
+雲萌 Windows 10+ デジタルライセンス認証アプリの新しいバージョン発見しました。&#10;アプリが古すぎるため、最新バージョンにアップデートしてから利用ください。
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-0" xml:space="preserve">
+Windows ライセンス認証にはインターネットを通じてキーを取得する必要があります :)
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1" xml:space="preserve">
+以前のキーをアンインストールできません :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.1" xml:space="preserve">
+キーをインストールできません、選択または入力されたエディションが間違っているかもしれません :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.2" xml:space="preserve">
+エディションコードを取得できません :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-2" xml:space="preserve">
+キーをインストールできません、選択または入力されたエディションが間違っているかもしれません :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-3" xml:space="preserve">
+タイムアウト,選択または入力されたエディションが間違っているかもしれません :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-4" xml:space="preserve">
+認証失敗。 :( &#10;多分: &#10;1. このエディション/バージョンの Windows はデジタルライセンス認証が適用しない。 &#10;2. マイクロソフトの認証サーバーに接続できません。 &#10;3. その他。 &#10;&#10;暫くお待ちくださいまたはあとでもう一度やり直してください。 &#10;
+    </sys:String>
+    <sys:String x:Key="Only_find_ltok" xml:space="preserve">
+このシステムエディションに適用されたのは長期オフラインKMS(LTOK)オプションしか見つかりません。これによってシステムを再インストールした時自動的にライセンス認証しませんが、心配する必要はありません。この方法(LTOK)でライセンス認証後、インターネット接続なしでも2038年まで稼働を継続できます!
+	</sys:String>
+    <sys:String x:Key="DonateTextWillActivated" xml:space="preserve">
+おめでとうございます! &#10;&#10;Windowsはライセンス認証の準備が出来ています。&#10;でも、マイクロソフトのライセンス認証サーバーに接続できませんみたいです。&#10;システムは認証サーバーに接続出来る次第に自動的にライセンス認証します。
+    </sys:String>
+</ResourceDictionary>

+ 225 - 0
CmwtatDigital/Lang/zh.xaml

@@ -0,0 +1,225 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <!--
+    Version: 2.6.0.0
+    -->
+
+    <!--FontFamily Dictionary-->
+
+    <FontFamily x:Key="Font">
+        Microsoft YaHei UI
+    </FontFamily>
+
+    <!--String Dictionary-->
+
+    <sys:String x:Key="OK">
+        好
+    </sys:String>
+    <sys:String x:Key="Cancel">
+        取消
+    </sys:String>
+    <sys:String x:Key="Refuse">
+        丑拒
+    </sys:String>
+    <sys:String x:Key="DonateBtn">
+        请顿晚饭,感谢作者
+    </sys:String>
+    <sys:String x:Key="Exit">
+        退出
+    </sys:String>
+    <sys:String x:Key="UpdateNow">
+        立即更新
+    </sys:String>
+    <sys:String x:Key="Ignore">
+        忽略
+    </sys:String>
+    <sys:String x:Key="TitleName">
+        云萌 Windows 10+ 数字权利激活工具
+    </sys:String>
+    <sys:String x:Key="AppName">
+        CMWTAT Digital Edition V2
+    </sys:String>
+    <sys:String x:Key="UpdateTitle">
+        新版本可用!
+    </sys:String>
+    <sys:String x:Key="UpgradeFullVersionWindowsTitle">
+        升级到完整版 Windows
+    </sys:String>
+    <sys:String x:Key="CurrentVersion">
+        当前版本
+    </sys:String>
+    <sys:String x:Key="LatestVersion">
+        最新版本
+    </sys:String>
+    <sys:String x:Key="Auto_Mode">
+        自动模式
+    </sys:String>
+    <sys:String x:Key="Manual_Mode">
+        手动模式
+    </sys:String>
+    <sys:String x:Key="Activate_Button">
+        激活
+    </sys:String>
+    <sys:String x:Key="Convert_versions">
+        版本无缝转换 (安装产品密钥而不激活)
+    </sys:String>
+    <sys:String x:Key="Upgrade_full_version">
+        升级到完整版 Windows
+    </sys:String>
+    <sys:String x:Key="test">
+        测试文本
+    </sys:String>
+    <sys:String x:Key="Loading">
+        载入中
+    </sys:String>
+    <sys:String x:Key="Activating">
+        激活中
+    </sys:String>
+    <sys:String x:Key="Complete">
+        完成
+    </sys:String>
+    <sys:String x:Key="notifyIconTitle">
+        云萌 Windows 10+ 激活工具 V2
+    </sys:String>
+    <sys:String x:Key="Running">
+        运行中。
+    </sys:String>
+    <sys:String x:Key="Experimental">
+        实验性
+    </sys:String>
+    <sys:String x:Key="Attention">
+        注意
+    </sys:String>
+    <sys:String x:Key="System_Edition">
+        系统版本
+    </sys:String>
+    <sys:String x:Key="May_be_not_be_supported">
+        无法在支持列表里识别您的操作系统版本,可能不受支持。
+    </sys:String>
+    <sys:String x:Key="Only_find_experimental">
+        只找到用于此版本系统的实验性选项,成功概率极低。
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_try">
+        你的系统版本可能不受支持,程序即将退出。不过你可以尝试添加 --expact 或者 -e 参数来启动。
+    </sys:String>
+    <sys:String x:Key="notify_May_be_not_be_supported_exit">
+        你的系统版本可能不受支持,程序即将退出。
+    </sys:String>
+    <sys:String x:Key="notify_Disconnect_to_server_exit">
+        无法连接服务器,请检查网络并尝试稍后重试,程序即将退出。
+    </sys:String>
+    <sys:String x:Key="Disconnect_to_server_exit">
+        无法连接服务器,请检查网络并尝试稍后重试,程序即将退出。
+    </sys:String>
+    <sys:String x:Key="RunInstall_Converting">
+        转换中
+    </sys:String>
+    <sys:String x:Key="RunAct_Activating">
+        激活中
+    </sys:String>
+    <sys:String x:Key="RunInstall_Getting_Key">
+        正在通过网络获取产品密钥
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_Key">
+        正在通过网络获取产品密钥
+    </sys:String>
+    <sys:String x:Key="RunInstall_Uninstalling_old_Key">
+        正在卸载旧的产品密钥
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key">
+        正在卸载旧的产品密钥
+    </sys:String>
+    <sys:String x:Key="RunAct_Uninstalling_old_Key_Exp">
+        正在卸载旧的产品密钥(实验性)
+    </sys:String>
+    <sys:String x:Key="RunInstall_Installing_Key">
+        正在安装产品密钥
+    </sys:String>
+    <sys:String x:Key="RunAct_Installing_Key">
+        正在安装产品密钥
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_edition_code_Exp">
+        正在获取版本代号(实验性)
+    </sys:String>
+    <sys:String x:Key="RunAct_Prepare_for_the_next_step_Exp">
+        正在准备下一步(实验性)
+    </sys:String>
+    <sys:String x:Key="RunAct_Writing_old_OS">
+        正在写入旧系统残留特征
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_free_upgrade_permissions">
+        正在获取免费升级许可
+    </sys:String>
+    <sys:String x:Key="RunAct_Cleaning_changes">
+        正在清理更改
+    </sys:String>
+    <sys:String x:Key="RunAct_Getting_digital_license">
+        正在获取数字许可证
+    </sys:String>
+    <sys:String x:Key="RunUpgradeFullVersion_Upgrading">
+        正在升级
+    </sys:String>
+    <sys:String x:Key="CompleteTitle">
+        完成
+    </sys:String>
+    <sys:String x:Key="ErrorTitle">
+        错误
+    </sys:String>
+    <sys:String x:Key="ErrorCode">
+        代码:
+    </sys:String>
+    <sys:String x:Key="SysMsg">
+        系统返回:
+    </sys:String>
+
+    <!--
+        Attention:
+        DO NOT USE ANY Indentation in Preserve Mode, Please!
+    -->
+
+    <sys:String x:Key="UpgradeFullVersionWindowsText" xml:space="preserve">
+当前正在使用核心版 Windows,你可以通过此功能升级到完整版 Windows。&#10;(如果操作没有反应可能是当前版本不支持升级,或者正在升级)&#10;&#10;注意:&#10;此操作不可逆,一旦升级完成将无法回退到核心版 Windows!&#10;&#10;确定要执行升级操作吗?
+    </sys:String>
+    <sys:String x:Key="HelpText" xml:space="preserve">
+这个应用现已支持通过控制台参数启动!&#10;&#10;-a&#9;--auto&#9;&#9;自动激活。&#10;-h&#9;--hide&#9;&#9;隐藏模式运行 (只能与 -auto 一起使用)。&#10;-e&#9;--expact&#9;实验性激活。&#10;-l&#9;--log&#9;&#9;输出日志到文件。&#10;-?&#9;--help&#9;&#9;显示此说明对话框。
+    </sys:String>
+    <sys:String x:Key="DonateTextConverted" xml:space="preserve">
+祝贺! &#10;&#10;Windows 已经成功转换。
+    </sys:String>
+    <sys:String x:Key="DonateTextActivated" xml:space="preserve">
+祝贺! &#10;&#10;Windows 已经成功激活。
+    </sys:String>
+    <sys:String x:Key="UpdateText" xml:space="preserve">
+我们发现了新版本的 云萌 Windows 10+ 数字权利激活工具。&#10;请更新到最新版本来确保它可以正常工作。
+    </sys:String>
+    <sys:String x:Key="UpdateMustText" xml:space="preserve">
+我们发现了新版本的 云萌 Windows 10+ 数字权利激活工具。&#10;由于您的版本太旧,所以您必须更新到最新版本来确保它可以正常工作。
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-0" xml:space="preserve">
+激活 Windows 需要网络获取产品密钥 :)
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1" xml:space="preserve">
+无法卸载旧密钥 :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.1" xml:space="preserve">
+无法安装密钥,可能没有选择或输入正确的版本 :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-1.2" xml:space="preserve">
+无法获取版本代号 :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-2" xml:space="preserve">
+无法安装密钥,可能没有选择或输入正确的版本 :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-3" xml:space="preserve">
+执行超时,可能没有选择正确或输入的版本 :(
+    </sys:String>
+    <sys:String x:Key="ErrorMsg-4" xml:space="preserve">
+激活失败。 :( &#10;可能因为: &#10;1. 此版本/类型的 Windows 不支持数字权利(数字许可证)方式激活。 &#10;2. 无法连接到微软Windows激活服务器。 &#10;3. 其它未知问题。 &#10;&#10;你可以尝试稍等片刻或者稍后重试。 &#10;
+    </sys:String>
+    <sys:String x:Key="Only_find_ltok" xml:space="preserve">
+只找到用于此版本系统的长期离线KMS(批量激活)选项。&#10;这表示您将不能在下次重装系统后自动激活。&#10;不过无需担心,这不同于传统的KMS激活方式(离线状态下可以保持激活180天)&#10;长期离线KMS(Offline-KMS)即使不联网也可以保持激活值2038年!
+    </sys:String>
+    <sys:String x:Key="DonateTextWillActivated" xml:space="preserve">
+祝贺! &#10;&#10;Windows 已经快要激活成功了。&#10;不过似乎Windows无法连接到微软激活服务器,&#10;当下次连接上服务器时系统将会自动激活。
+    </sys:String>
+</ResourceDictionary>

+ 255 - 0
CmwtatDigital/MainWindow.xaml

@@ -0,0 +1,255 @@
+<Window x:Class="CmwtatDigital.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:domain="clr-namespace:CmwtatDigital.Domain"
+        xmlns:local="clr-namespace:CmwtatDigital"
+        mc:Ignorable="d"
+        Title="{DynamicResource TitleName}" Height="645" Width="450"
+        ResizeMode="NoResize"
+        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+        TextElement.Foreground="{DynamicResource MaterialDesignBody}"
+        TextElement.FontWeight="Regular"
+        TextElement.FontSize="13"
+        TextOptions.TextFormattingMode="Ideal"
+        TextOptions.TextRenderingMode="Aliased"
+        Background="{DynamicResource MaterialDesignPaper}"
+        d:DataContext="{d:DesignInstance domain:ViewModel, d:IsDesignTimeCreatable=False}"
+        Icon="CMWTAT.ico"
+        Closing="Window_Closing"
+        FontFamily="{DynamicResource Font}"
+        Activated="Window_Activated"
+        WindowStartupLocation="CenterScreen"
+        >
+    <!--FontFamily="{DynamicResource MaterialDesignFont}"-->
+    <Grid>
+        <Grid Margin="30,30,30,30" VerticalAlignment="Center">
+            <StackPanel>
+                <materialDesign:Card Padding="30" Margin="0,0,0,0" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8">
+                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" ><Run Text="{DynamicResource AppName}"/></TextBlock>
+                </materialDesign:Card>
+                <materialDesign:Card Padding="30,30" Margin="0,30,0,0" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8">
+                    <StackPanel>
+                        <Grid>
+                            <ComboBox x:Name="SystemEditionText" DisplayMemberPath="DisplayOS" VerticalAlignment="Center" Visibility="Visible"/>
+                            <TextBox x:Name="SystemEditionTextInput" materialDesign:HintAssist.Hint="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" MaxLength="29" xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore" input:InputMethod.IsInputMethodEnabled="False" VerticalAlignment="Center" Visibility="Hidden" TextChanged="SystemEditionTextInput_TextChanged">
+                                <TextBox.Text>
+                                    <Binding Path="SN" UpdateSourceTrigger="PropertyChanged">
+                                        <Binding.ValidationRules>
+                                            <domain:IsSN ValidatesOnTargetUpdated="True"/>
+                                        </Binding.ValidationRules>
+                                    </Binding>
+                                </TextBox.Text>
+                            </TextBox>
+                        </Grid>
+                        <!--<TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignTitleTextBlock}" x:Name="SystemEditionText"  Text="Checking System" />-->
+                        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,30,0,0">
+                            <RadioButton x:Name="AutoRadio" Content="{DynamicResource Auto_Mode}" Margin="30,0,30,0" IsChecked="True" Checked="A_RadioButton_Checked"/>
+                            <RadioButton x:Name="ManualRadio" Content="{DynamicResource Manual_Mode}" Margin="30,0,30,0" Checked="M_RadioButton_Checked"/>
+                        </StackPanel>
+                    </StackPanel>
+                </materialDesign:Card>
+                <Button FontFamily="{DynamicResource Font}" x:Name="actbtn" Click="Activate_Button_Click" Content="{DynamicResource Activate_Button}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand" />
+                <Button FontFamily="{DynamicResource Font}" x:Name="installbtn" Click="installbtn_Click" Content="{DynamicResource Convert_versions}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand"/>
+                <Button FontFamily="{DynamicResource Font}" x:Name="upgradefullbtn" Click="upgradefullbtn_Click" Content="{DynamicResource Upgrade_full_version}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand"/>
+            </StackPanel>
+        </Grid>
+        <Grid x:Name="DialogHostGrid" Visibility="Hidden">
+            <materialDesign:DialogHost x:Name="DialogWait" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="32,24,32,24">
+                                    <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Loading}" />
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogActProg" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="32,24,32,24">
+                                    <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="activatingtext"  Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Activating}" />
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogWithCancel" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="24,24,24,8">
+                                    <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="24,16,24,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Loading}" />
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
+                                            CommandParameter="Sample2Cancel"
+                                            HorizontalAlignment="Center" Content="{DynamicResource Cancel}" />
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogWithOK" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="Title" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="Hello World" />
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
+                                            CommandParameter="Sample2Cancel"
+                                            HorizontalAlignment="Center" Content="{DynamicResource OK}" />
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogHelp" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="Help"></TextBlock>
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}"  Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource HelpText}"></TextBlock>
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
+                                            CommandParameter="Sample2Cancel"
+                                            HorizontalAlignment="Center" Content="{DynamicResource OK}" />
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogWithExit" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithExitTitle"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource ErrorTitle}"/>
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithExitText"  Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Disconnect_to_server_exit}"/>
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                        Click="Exit_Button_Click"
+                                        HorizontalAlignment="Center" Content="{DynamicResource Exit}"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogWithOKToCloseDialog" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogTitle"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Title</TextBlock>
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogText"  Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Text</TextBlock>
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
+                                            HorizontalAlignment="Center" Content="{DynamicResource OK}"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogWithOKToCloseDialogDonate" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogDonateTitle"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource Complete}" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogDonateText"  Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource DonateTextActivated}" />
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Refuse}"/>
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Click="Donate_Button_Click" HorizontalAlignment="Center" Content="{DynamicResource DonateBtn}"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogUpdate" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogUpdateTitle"  Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource UpdateTitle}" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogUpdateText"  Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource UpdateText}" />
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button x:Name="IgnoreUpdate" FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Ignore}"/>
+                                    <Button x:Name="UpdateBtn" FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Click="UpdateBtn_Click" HorizontalAlignment="Center" Content="{DynamicResource UpdateNow}"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+            <materialDesign:DialogHost x:Name="DialogUpgradeFullVersion" IsOpen="False">
+                <materialDesign:DialogHost.DialogContent>
+                    <Grid>
+                        <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
+                            <StackPanel>
+                                <StackPanel Margin="16,16,16,8">
+                                    <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource UpgradeFullVersionWindowsTitle}" />
+                                    <TextBlock FontFamily="{DynamicResource Font}"  Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource UpgradeFullVersionWindowsText}" />
+                                </StackPanel>
+                                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
+                                            Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Cancel}"/>
+                                    <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" 
+                                            Click="UpgradeFullVersionWindows_Click" HorizontalAlignment="Center" Content="{DynamicResource OK}"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </materialDesign:Card>
+                    </Grid>
+                </materialDesign:DialogHost.DialogContent>
+            </materialDesign:DialogHost>
+        </Grid>
+    </Grid>
+
+</Window>

+ 1511 - 0
CmwtatDigital/MainWindow.xaml.cs

@@ -0,0 +1,1511 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using OSVersionInfoClass;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System.Net;
+using System.IO;
+using System.Threading;
+using Microsoft.Win32;
+using CmwtatDigital.Domain;
+using System.Text.RegularExpressions;
+using System.Windows.Forms;
+using System.Globalization;
+using System.Reflection;
+using MaterialDesignThemes.Wpf;
+
+namespace CmwtatDigital
+{
+
+    static class Constants
+    {
+        public const string DefaultLang = "en"; // 缺省语言
+    }
+
+    /// <summary>
+    /// MainWindow.xaml 的交互逻辑
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        [DllImport("Kernel32.dll")]
+        private static extern bool Wow64EnableWow64FsRedirection(bool Wow64FsEnableRedirection);//重定向
+
+        public struct Frequency
+        {
+            public int ID { get; set; }
+            public string DisplayOS { get; set; }
+        }
+
+        public static void ConsoleLog(string log_text = "")
+        {
+            Console.WriteLine(log_text);
+            if (Program.log2file == true)
+            {
+                WriteLog(log_text);
+            }
+        }
+
+        public static void WriteLog(string strLog)
+        {
+            string sFilePath = AppDomain.CurrentDomain.BaseDirectory;
+            string sFileName = "CMWTAT-" + DateTime.Now.ToString("yyyy-MM-dd") + ".log";
+            sFileName = sFilePath + sFileName; //文件的绝对路径
+            if (!Directory.Exists(sFilePath))//验证路径是否存在
+            {
+                Directory.CreateDirectory(sFilePath);
+                //不存在则创建
+            }
+            FileStream fs;
+            StreamWriter sw;
+            if (File.Exists(sFileName))
+            //验证文件是否存在,有则追加,无则创建
+            {
+                fs = new FileStream(sFileName, FileMode.Append, FileAccess.Write);
+            }
+            else
+            {
+                fs = new FileStream(sFileName, FileMode.Create, FileAccess.Write);
+            }
+            sw = new StreamWriter(fs);
+            sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + "   ---   " + strLog);
+            sw.Close();
+            fs.Close();
+        }
+
+        string tempfile = System.IO.Path.GetTempPath() + @"CmwtatDigital\";
+
+        public void DelectTempFile()
+        {
+            if (Directory.Exists(tempfile))
+            {
+                try
+                {
+                    FileAttributes attr = File.GetAttributes(tempfile);
+                    if (attr == FileAttributes.Directory)
+                    {
+
+                        Directory.Delete(tempfile, true);
+
+                    }
+                    else
+                    {
+                        File.Delete(tempfile);
+                    }
+                }
+                catch (Exception e)
+                {
+                    ConsoleLog("DelectTempFile:" + e.Message);
+                }
+            }
+        }
+
+        public void ExportTempFile()
+        {
+            if (Directory.Exists(tempfile))
+            {
+                ConsoleLog("找到已存在的缓存,开始删除");
+                DelectTempFile();
+                ConsoleLog("删除操作完毕");
+                if (Directory.Exists(tempfile))
+                {
+                    ConsoleLog("[警告] 检测到文件依旧存在");
+                }
+            }
+
+            ConsoleLog("开始创建缓存目录");
+            if (Directory.Exists(tempfile) == false)
+            {
+                Directory.CreateDirectory(tempfile);
+            }
+            ConsoleLog("创建缓存目录完毕");
+
+            ConsoleLog("开始写入缓存文件");
+            File.WriteAllBytes(tempfile + "ClipUp" + ".exe", Properties.Resources.ClipUp);
+            //File.WriteAllBytes(tempfile + "LibHWIDx86" + ".dll", Properties.Resources.LibHWIDx86);
+            //File.WriteAllBytes(tempfile + "LibHWIDx64" + ".dll", Properties.Resources.LibHWIDx64);
+            File.WriteAllBytes(tempfile + "slmgr" + ".vbs", Properties.Resources.slmgr);
+            ConsoleLog("写入缓存文件完毕");
+        }
+
+        public static string LocalLang = Constants.DefaultLang;
+        public static string NowLang = LocalLang;
+        ResourceDictionary langRd = null; //语言资源字典
+        public static CultureInfo currentCultureInfo = CultureInfo.CurrentCulture; //获取系统语言
+        public static bool NotSupportLang = false;
+
+        /// <summary>
+        /// 加载指定语言(支持热加载)
+        /// </summary>
+        public void LoadLang(string LangName = Constants.DefaultLang)
+        {
+
+            //MessageBox.Show(currentCultureInfo.Name);
+
+            try
+            {
+                //根据名字载入语言文件
+                langRd = System.Windows.Application.LoadComponent(new Uri(@"Lang\" + LangName + ".xaml", UriKind.Relative)) as ResourceDictionary;
+                NowLang = LangName;
+                if (LangName != Constants.DefaultLang)
+                {
+                    LocalLang = LangName;
+                    //btnChangeLang.Tag = LocalLang;
+                }
+                NotSupportLang = false;
+            }
+            catch
+            {
+                NotSupportLang = true;
+                //System.Windows.MessageBox.Show("The " + LangName + " language pack was not found and the language was set to English.\nIf you want to use Chinese as the interface language, click the \"Language\" button to switch.");
+                langRd = System.Windows.Application.LoadComponent(new Uri(@"Lang\" + Constants.DefaultLang + ".xaml", UriKind.Relative)) as ResourceDictionary;
+                NowLang = Constants.DefaultLang;
+            }
+
+            if (langRd != null)
+            {
+                //如果已使用其他语言,先清空
+                if (this.Resources.MergedDictionaries.Count > 0)
+                {
+                    this.Resources.MergedDictionaries.Clear();
+                }
+                this.Resources.MergedDictionaries.Add(langRd);
+            }
+        }
+
+        private static void ApplyBase(bool isDark)
+        {
+            var theme = new PaletteHelper().GetTheme();
+            theme.SetBaseTheme(isDark ? Theme.Dark : Theme.Light);
+            new PaletteHelper().SetTheme(theme);
+        }
+
+        string ProductVersion = "0.0.0.0"; // 存储程序版本
+
+        /// <summary>
+        /// 获取当前版本
+        /// </summary>
+        private void GetEdition()
+        {
+            Assembly assembly = Assembly.GetExecutingAssembly();
+
+            ConsoleLog("AppAssemblyFullName: " + assembly.FullName);
+
+            // 获取程序集元数据 
+            AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)
+            AssemblyCopyrightAttribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
+            typeof(AssemblyCopyrightAttribute));
+            AssemblyDescriptionAttribute description = (AssemblyDescriptionAttribute)
+            AssemblyDescriptionAttribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(),
+            typeof(AssemblyDescriptionAttribute));
+
+            ProductVersion = System.Windows.Forms.Application.ProductVersion;
+
+            ConsoleLog("AppDescription: " + description.Description);
+            ConsoleLog("AppCopyright: " + copyright.Copyright);
+            ConsoleLog("AppProductVersion: " + System.Windows.Forms.Application.ProductVersion);
+        }
+
+        //static bool autoact = false;
+        //static bool hiderun = false;
+        //static bool expact = false;
+        //static bool log2file = false;
+        //static bool showhelp = false;
+
+        //public string SystemEdition = OSVersionInfo.Name + " " + OSVersionInfo.Edition;
+        public string SystemEdition = OSVersionInfo.Edition;
+
+        bool isDark = false;
+
+        string WindowsTheme = "Light";
+
+        NotifyIcon notifyIcon;
+
+        public void CheckWindowsTheme()
+        {
+            var uiSettings = new Windows.UI.ViewManagement.UISettings();
+            Windows.UI.Color Wcolor = uiSettings.GetColorValue(Windows.UI.ViewManagement.UIColorType.Background);
+            System.Drawing.Color Scolor = System.Drawing.Color.FromArgb(Wcolor.R, Wcolor.G, Wcolor.B);
+            float hue = Scolor.GetHue(); // 色调
+            float saturation = Scolor.GetSaturation(); // 饱和度
+            float lightness = Scolor.GetBrightness(); // 亮度
+
+            if (lightness > 0.75)
+            {
+                isDark = false;
+                WindowsTheme = "Light";
+            }
+            else
+            {
+                isDark = true;
+                WindowsTheme = "Dark";
+            }
+
+            //ConsoleLog("Windows Theme Background is: " + Wcolor);
+            //ConsoleLog("Windows Theme Brightness is: " + lightness);
+            //ConsoleLog("Windows Theme Mode is: " + WindowsTheme);
+        }
+
+        public MainWindow()
+        {
+            CheckWindowsTheme();
+
+            ConsoleLog("Windows Theme Mode is: " + WindowsTheme);
+
+            GetEdition(); // 获取程序版本
+
+            //autoact = Program.autoact;
+            //hiderun = Program.hiderun;
+            //expact = Program.expact;
+            //log2file = Program.log2file;
+            //showhelp = Program.showhelp;
+
+            //MessageBox.Show("A:" + autoact.ToString() + ";H:" + hiderun.ToString());
+
+            InitializeComponent();
+
+            ApplyBase(isDark);
+
+            string LangName = currentCultureInfo.Name;
+            //根据本地语言来进行本地化
+            LangName = LangName.Substring(0, LangName.IndexOf("-"));
+            //LangName = "ja"; // 如需测试语言,请取消注释此行
+            LoadLang(LangName);
+
+            this.Title = this.Title + " V" + ProductVersion; // 初始化语言后为标题增加版本号
+
+            //System.Windows.MessageBox.Show((string)this.Resources["HelpText"]);
+
+            if (Program.showhelp == true)
+            {
+                DialogHelp.IsOpen = true;
+            }
+
+            notifyIcon = new System.Windows.Forms.NotifyIcon(); // 先初始化托盘图标,以方便语言缺省时提示
+            notifyIcon.Text = (string)this.Resources["notifyIconTitle"]; //托盘图标标题
+            notifyIcon.Icon = ((System.Drawing.Icon)(CmwtatDigital.Properties.Resources.CMWTAT_ICON));
+
+            if ((Program.hiderun == true && Program.autoact == true) || NotSupportLang == true)
+            {
+                notifyIcon.Visible = true;
+
+                //打开菜单项
+                //System.Windows.Forms.MenuItem open = new System.Windows.Forms.MenuItem("Open");
+                //open.Click += new EventHandler((o, e) =>
+                //{
+                //    this.Show();
+                //});
+
+                //退出菜单项
+                System.Windows.Forms.MenuItem exit = new System.Windows.Forms.MenuItem("Exit");
+                exit.Click += new EventHandler(Exit_Button_Click);
+
+                //关联托盘控件
+                System.Windows.Forms.MenuItem[] childen = new System.Windows.Forms.MenuItem[] { exit };
+                notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(childen);
+            }
+
+            if (NotSupportLang == true)
+            {
+                int tipShowMilliseconds = 0;
+                string tipTitle = (string)this.Resources["notifyIconTitle"];
+                string tipContent = "The language pack \"" + LangName + "\" was not found, language has been automatically switched to English. You can submit this language on GitHub."; // 提示不支持语言提示
+                ToolTipIcon tipType = ToolTipIcon.None;
+                notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+            }
+
+            if (Program.hiderun == true && Program.autoact == true)
+            {
+                this.Hide();
+
+                int tipShowMilliseconds = 0;
+                string tipTitle = (string)this.Resources["notifyIconTitle"]; //通知气泡标题
+                string tipContent = (string)this.Resources["Running"]; //提示正在运行
+                ToolTipIcon tipType = ToolTipIcon.None;
+                notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+            }
+
+            //初始化动态表单数据绑定
+            DataContext = new ViewModel();
+
+            this.DialogHostGrid.Visibility = Visibility.Visible;
+
+            DialogWait.IsOpen = true;
+            try
+            {
+                RegistryKey pRegKey = Registry.LocalMachine;
+                pRegKey = pRegKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
+                SystemEdition = pRegKey.GetValue("EditionID").ToString();
+            }
+            catch
+            {
+                SystemEdition = OSVersionInfo.Edition;
+            }
+
+            //SystemEditionText.Text = SystemEdition;
+            Thread loadthread = new Thread(LoadOSList);
+            loadthread.Start();
+
+            CheckWindowsCore();
+        }
+
+        JArray ositems;
+        int now_os_index = 0;
+        string checked_os = "unknow";
+
+        bool is_auto = true; //是否为自动模式,false为手动
+
+        private void InvokeTest()
+        {
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                LoadOSList();
+            }));
+        }
+
+        /// <summary>
+        /// 检查更新
+        /// </summary>
+        private void CheckUpdate()
+        {
+            try
+            {
+                string check_update_json = GetHttpWebRequest("https://cmwtat.cloudmoe.com/api/check_update?version=" + ProductVersion);
+                JObject check_update_jsonobj = JObject.Parse(check_update_json);
+                List<Frequency> check_update_list = new List<Frequency>();
+                JValue latest_version = (JValue)check_update_jsonobj["latest"];
+                JValue oldest_version = (JValue)check_update_jsonobj["oldest"];
+                //System.Windows.MessageBox.Show(latest_version.ToString());
+                Version CurrentVersion = new Version(ProductVersion);
+                Version LatestVersion = new Version(latest_version.ToString());
+                Version AllowedVersion = new Version(oldest_version.ToString());
+                if (CurrentVersion >= LatestVersion) // 当前版本大于等于最新版本
+                {
+                    //System.Windows.MessageBox.Show("无需更新");
+                }
+                if (CurrentVersion < LatestVersion) // 当前版本小于最新版本
+                {
+                    actbtn.Dispatcher.Invoke(new Action(() =>
+                    {
+                        if (CurrentVersion < AllowedVersion) // 当前版本小于最低允许版本
+                        {
+                            this.IgnoreUpdate.IsEnabled = false;
+                            //System.Windows.MessageBox.Show("必须更新");
+                        }
+                        else
+                        {
+                            this.IgnoreUpdate.IsEnabled = true;
+                        }
+                        this.DialogUpdateTitle.Text = (string)this.Resources["UpdateTitle"];
+                        this.DialogUpdateText.Text = (string)this.Resources["UpdateText"] + "\r\n" + (string)this.Resources["CurrentVersion"] + ": " + ProductVersion + "\r\n" + (string)this.Resources["LatestVersion"] + ": " + latest_version.ToString();
+                        this.DialogUpdate.IsOpen = true;
+                    }));
+                    //System.Windows.MessageBox.Show("需要更新");
+                }
+            }
+            catch
+            {
+            }
+        }
+
+        public static string MainServerDomain = "https://cmwtat.cloudmoe.com"; // 主要服务器
+        public static string BackupServerDomain = "https://kms.kumo.moe"; // 备用服务器
+
+        private void LoadOSList()
+        {
+
+            int is_selected = 0; //是否已经自动选择,0未选择,1普通模式,2实验模式,3离线KMS模式
+
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                DialogWait.IsOpen = true;
+            }));
+
+            try
+            {
+                string json;
+                try
+                {
+                    json = GetHttpWebRequest(MainServerDomain + "/api/digital?list=1&ver=3"); // 主要服务器
+                }
+                catch (Exception e)
+                {
+                    ConsoleLog("MainServer:" + MainServerDomain + " is not working.");
+                    ConsoleLog("Error Message:" + e.Message);
+                    ConsoleLog("Ready to use BackupServer:" + BackupServerDomain);
+                    json = GetHttpWebRequest(BackupServerDomain + "/api/digital?list=1&ver=3"); // 备用服务器
+                }
+                JObject jsonobj = JObject.Parse(json);
+                List<Frequency> list = new List<Frequency>();
+                Frequency freq = new Frequency();
+                ositems = (JArray)jsonobj["OS"];
+
+                for (int i = 0; i < ositems.Count(); i++)
+                {
+                    freq.ID = i;
+                    freq.DisplayOS = jsonobj["OS"][i].ToString();
+
+                    //按照优先级判断,如果已经自动选择则忽略新的
+                    //选择带版本号
+                    if (String.Equals(jsonobj["OS"][i].ToString(), SystemEdition + OSVersionInfo.BuildVersion, StringComparison.CurrentCultureIgnoreCase) && is_selected == 0)//jsonobj["OS"][i].ToString() == SystemEdition + OSVersionInfo.BuildVersion
+                    {
+                        now_os_index = i;
+                        checked_os = SystemEdition + OSVersionInfo.BuildVersion;
+                        is_selected = 1;
+                    }
+
+                    //选择带版本号Offline-KMS
+                    if (String.Equals(jsonobj["OS"][i].ToString(), "(Offline-KMS) " + SystemEdition + OSVersionInfo.BuildVersion, StringComparison.CurrentCultureIgnoreCase) && is_selected == 0)//旧的方法:jsonobj["OS"][i].ToString() == "(Experimental) " + SystemEdition,新方法忽略大小写并提升效率
+                    {
+                        now_os_index = i;
+                        checked_os = "(Offline-KMS) " + SystemEdition + OSVersionInfo.BuildVersion;
+                        is_selected = 3;
+                    }
+
+                    //选择不带版本号
+                    if (String.Equals(jsonobj["OS"][i].ToString(), SystemEdition, StringComparison.CurrentCultureIgnoreCase) && is_selected == 0)//jsonobj["OS"][i].ToString() == SystemEdition
+                    {
+                        now_os_index = i;
+                        checked_os = SystemEdition;
+                        is_selected = 1;
+                    }
+
+                    //选择不带版本号Offline-KMS
+                    if (String.Equals(jsonobj["OS"][i].ToString(), "(Offline-KMS) " + SystemEdition, StringComparison.CurrentCultureIgnoreCase) && is_selected == 0)//旧的方法:jsonobj["OS"][i].ToString() == "(Experimental) " + SystemEdition,新方法忽略大小写并提升效率
+                    {
+                        now_os_index = i;
+                        checked_os = "(Offline-KMS) " + SystemEdition;
+                        is_selected = 3;
+                    }
+
+                    //选择不带版本号实验
+                    if (String.Equals(jsonobj["OS"][i].ToString(), "(Experimental) " + SystemEdition, StringComparison.CurrentCultureIgnoreCase) && is_selected == 0)//旧的方法:jsonobj["OS"][i].ToString() == "(Experimental) " + SystemEdition,新方法忽略大小写并提升效率
+                    {
+                        now_os_index = i;
+                        checked_os = "(Experimental) " + SystemEdition;
+                        is_selected = 2;
+                    }
+                    list.Add(freq);
+                }
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.SystemEditionText.ItemsSource = list;//控件的ID
+
+                    if (is_selected == 0)//没有匹配
+                    {
+                        this.SystemEditionText.SelectedIndex = 0;
+                        this.DialogWithOKToCloseDialogTitle.Text = (string)this.Resources["Attention"];
+                        this.DialogWithOKToCloseDialogText.Text = (string)this.Resources["May_be_not_be_supported"] + "\r\n(" + (string)this.Resources["System_Edition"] + ": " + SystemEdition + OSVersionInfo.BuildVersion + ")";
+                        this.DialogWithOKToCloseDialog.IsOpen = true;
+                    }
+                    else if (is_selected == 2)//只找到实验性
+                    {
+                        this.SystemEditionText.SelectedIndex = now_os_index;
+                        this.DialogWithOKToCloseDialogTitle.Text = (string)this.Resources["Attention"];
+                        this.DialogWithOKToCloseDialogText.Text = (string)this.Resources["Only_find_experimental"] + "\r\n(" + (string)this.Resources["System_Edition"] + ": " + SystemEdition + OSVersionInfo.BuildVersion + ")";
+                        this.DialogWithOKToCloseDialog.IsOpen = true;
+                    }
+                    else if (is_selected == 3)//只找到长期KMS
+                    {
+                        this.SystemEditionText.SelectedIndex = now_os_index;
+                        this.DialogWithOKToCloseDialogTitle.Text = (string)this.Resources["Attention"];
+                        this.DialogWithOKToCloseDialogText.Text = (string)this.Resources["Only_find_ltok"] + "\r\n(" + (string)this.Resources["System_Edition"] + ": " + SystemEdition + OSVersionInfo.BuildVersion + ")";
+                        this.DialogWithOKToCloseDialog.IsOpen = true;
+                    }
+                    else
+                    {
+                        this.SystemEditionText.SelectedIndex = now_os_index;
+                    }
+                }));
+
+                //this.SystemEditionText.SelectedIndex = now_os_index;
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    DialogWait.IsOpen = false;
+                }));
+
+                if (Program.autoact == true)//自动激活
+                {
+                    Thread actthread = new Thread(RunAct);
+                    switch (is_selected)
+                    {
+                        case 1: //正常
+                            actthread.Start();
+                            break;
+                        case 2: //实验性
+                            if (Program.expact == true)
+                            {
+                                actbtn.Dispatcher.Invoke(new Action(() =>
+                                {
+                                    DialogWithOKToCloseDialog.IsOpen = false;
+                                }));
+                                actthread.Start();
+                            }
+                            else
+                            {
+                                if (Program.hiderun == true)
+                                {
+                                    int tipShowMilliseconds = 0;
+                                    string tipTitle = (string)this.Resources["notifyIconTitle"];
+                                    string tipContent = (string)this.Resources["notify_May_be_not_be_supported_try"]; //提示不支持可尝试实验性
+                                    ToolTipIcon tipType = ToolTipIcon.None;
+                                    notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                                    Exit_Button_Click(null, null);//退出
+                                }
+                            }
+                            break;
+                        default:
+                            if (Program.hiderun == true)
+                            {
+                                int tipShowMilliseconds = 0;
+                                string tipTitle = (string)this.Resources["notifyIconTitle"];
+                                string tipContent = (string)this.Resources["notify_May_be_not_be_supported_exit"]; //提示不支持并退出(实验性开启)
+                                ToolTipIcon tipType = ToolTipIcon.None;
+                                notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                                Exit_Button_Click(null, null);//退出
+                            }
+                            break;
+                    }
+                }
+            }
+            catch
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    DialogWait.IsOpen = false;
+                }));
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    DialogWithExit.IsOpen = true;
+                }));
+
+                if (Program.hiderun == true && Program.autoact == true)
+                {
+                    int tipShowMilliseconds = 0;
+                    string tipTitle = (string)this.Resources["notifyIconTitle"];
+                    string tipContent = (string)this.Resources["notify_Disconnect_to_server_exit"]; //提示无法连接服务器退出
+                    ToolTipIcon tipType = ToolTipIcon.None;
+                    notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                    Exit_Button_Click(null, null);//退出
+                }
+            }
+            CheckUpdate(); // 检查更新
+        }
+
+        private void CheckWindowsCore()
+        {
+            if (SystemEdition.ToLower().IndexOf("core") == -1)
+            {
+                upgradefullbtn.IsEnabled = false;
+                upgradefullbtn.Visibility = Visibility.Collapsed;
+                this.Height -= 95;
+            }
+        }
+
+        private void Activate_Button_Click(object sender, RoutedEventArgs e)
+        {
+            Thread actthread = new Thread(RunAct);
+            actthread.Start();
+
+            //RunAct();
+            //LoadOSList();
+
+            //MessageBox.Show(json);
+            //MessageBox.Show(rss["OS"][0].ToString());
+            //MessageBox.Show(SystemEdition);
+        }
+
+        private void installbtn_Click(object sender, RoutedEventArgs e)
+        {
+            Thread installthread = new Thread(RunInstall);
+            installthread.Start();
+        }
+
+        private void upgradefullbtn_Click(object sender, RoutedEventArgs e)
+        {
+            this.DialogUpgradeFullVersion.IsOpen = true;
+        }
+
+        private void UpgradeFullVersionWindows_Click(object sender, RoutedEventArgs e)
+        {
+            this.DialogUpgradeFullVersion.IsOpen = false;
+            Thread upgradethread = new Thread(RunUpgradeFullVersion);
+            upgradethread.Start();
+        }
+
+        private string GetHttpWebRequest(string url, int timeout = 10000, int retry = 2)
+        {
+            string outex = "UnknowError";
+            for (int i = 0; i < retry; i++) // 默认重试2次
+            {
+                ConsoleLog("GetHttpWebRequest Try: " + i.ToString());
+                try
+                {
+                    Uri uri = new Uri(url);
+                    HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(uri);
+                    myReq.UserAgent = "User-Agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705";
+                    myReq.Accept = "*/*";
+                    myReq.KeepAlive = true;
+                    myReq.Headers.Add("Accept-Language", "zh-cn,en-us;q=0.5");
+                    myReq.Timeout = timeout; // 默认10s超时
+                    HttpWebResponse result = null;
+                    string strHTML = null;
+                    result = (HttpWebResponse)myReq.GetResponse();
+                    Stream receviceStream = result.GetResponseStream();
+                    StreamReader readerOfStream = new StreamReader(receviceStream, System.Text.Encoding.GetEncoding("utf-8"));
+                    strHTML = readerOfStream.ReadToEnd();
+                    readerOfStream.Close();
+                    receviceStream.Close();
+                    result.Close();
+                    return strHTML;
+                }
+                catch (WebException ex)
+                {
+                    outex = ex.Message;
+                    ConsoleLog("GetHttpWebRequest Exception: " + ex.Message);
+                    if (ex.Status == WebExceptionStatus.Timeout) // 超时重试
+                    {
+                        continue;
+                    }
+                    throw new Exception(ex.Message); // 其他错误抛出
+                }
+            }
+            throw new Exception(outex);
+        }
+
+        private void Exit_Button_Click(object sender, EventArgs e)
+        {
+            DelectTempFile();
+            notifyIcon.Visible = false;
+            System.Windows.Application.Current.Shutdown();
+        }
+
+        private void RunInstall()
+        {
+            ExportTempFile();
+            //释放文件
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.DialogActProg.IsOpen = true;
+                this.activatingtext.Text = (string)this.Resources["RunInstall_Converting"]; //提示转换中
+            }));
+
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+
+            string code = "-0";
+            string key = "00000-00000-00000-00000-00000";
+            string sku = "0";
+            string msg = "Unknow Error!";
+            string system = "";
+
+            string slmgr = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86) + "\\slmgr.vbs";
+
+            string slmgr_self = tempfile + "slmgr.vbs";
+
+            try
+            {
+                string sourceFile = slmgr;
+                string targetFile = slmgr_self;
+                bool isrewrite = true; // true=覆盖已存在的同名文件,false则反之
+                ConsoleLog("Copy Start: " + sourceFile + " To " + targetFile);
+                System.IO.File.Copy(sourceFile, targetFile, isrewrite);
+                ConsoleLog("Copy Completed.");
+            }
+            catch (Exception CopyExc)
+            {
+                ConsoleLog("Copy has Exception: " + CopyExc.Message);
+            }
+
+            //旧的位置
+            //string slmgr_self = System.AppDomain.CurrentDomain.BaseDirectory + "slmgr.vbs";
+
+            string changepk = Environment.SystemDirectory + "\\changepk.exe";
+
+            if (is_auto == true)
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    system = this.SystemEditionText.Text;
+                }));
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.activatingtext.Text = (string)this.Resources["RunInstall_Getting_Key"]; //提示正在获取密钥
+                }));
+
+                //获取密钥和SKU
+                try
+                {
+
+                    string json;
+                    try
+                    {
+                        json = GetHttpWebRequest(MainServerDomain + "/api/digital?list=0&ver=3"); // 主要服务器
+                    }
+                    catch (Exception e)
+                    {
+                        ConsoleLog("MainServer:" + MainServerDomain + " is not working.");
+                        ConsoleLog("Error Message:" + e.Message);
+                        ConsoleLog("Ready to use BackupServer:" + BackupServerDomain);
+                        json = GetHttpWebRequest(BackupServerDomain + "/api/digital?list=0&ver=3"); // 备用服务器
+                    }
+                    JObject jsonobj = JObject.Parse(json);
+                    List<Frequency> list = new List<Frequency>();
+                    ositems = (JArray)jsonobj["OS"];
+                    key = jsonobj[system]["key"].ToString();
+                    sku = jsonobj[system]["sku"].ToString();
+                    ConsoleLog("Edition:" + system + "\r\nKEY:" + key + "\r\nSKU:" + sku);
+
+                }
+                catch
+                {
+                    code = "-0";
+                    msg = (string)this.Resources["ErrorMsg-0"]; // "激活Windows10需要网络获取产品密钥 :) \nActivate Windows 10 requires a network to gets the product key :)";
+                    goto EndLine;
+                }
+            }
+            else
+            {
+
+                //手动密钥
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    key = this.SystemEditionTextInput.Text;
+                }));
+
+            }
+
+
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.activatingtext.Text = (string)this.Resources["RunInstall_Uninstalling_old_Key"]; //提示正在卸载旧密钥
+            }));
+            //卸载
+            string runend = RunCScript(slmgr_self, "-upk").Trim();
+            //string runend = RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -upk").Trim();
+            ConsoleLog(runend);
+            if (runend.EndsWith("successfully.") || runend.EndsWith("not found."))
+            {
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.activatingtext.Text = (string)this.Resources["RunInstall_Installing_Key"]; //提示正在安装密钥
+                }));
+
+                //安装数字权利升级密钥
+                if (RunCScript(slmgr_self, "-ipk " + key).Trim().EndsWith("successfully."))
+                //if (RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -ipk " + key).Trim().EndsWith("successfully."))
+                {
+                    code = "200";
+                }
+                else
+                {
+                    code = "-2";
+                    msg = (string)this.Resources["ErrorMsg-2"]; // "无法安装密钥,可能没有选择或输入正确的版本 :(\nCannot to install key, may be you choose or enter a incorrect version. :(";
+                }
+            }
+            else
+            {
+                code = "-1";
+                msg = (string)this.Resources["ErrorMsg-1"]; // "无法卸载旧密钥 :(\nCannot to uninstall old key. :(";
+            }
+        //string runend = RunCScript(slmgr_self, "-upk").Trim();
+        EndLine:;
+            if (code != "200")
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.DialogActProg.IsOpen = false;
+                    this.activatingtext.Text = (string)this.Resources["RunInstall_Converting"]; //提示转换中
+                    this.DialogWithOKToCloseDialog.IsOpen = true;
+                    this.DialogWithOKToCloseDialogTitle.Text = (string)this.Resources["ErrorTitle"]; //错误标题
+                    this.DialogWithOKToCloseDialogText.Text = msg + "\r\n" + (string)this.Resources["ErrorCode"] + code; //错误代码 如:错误信息\r\nCode:000
+                }));
+                //MessageBox.Show(msg + "\r\nCode:" + code);
+            }
+            else
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.DialogActProg.IsOpen = false;
+                    this.activatingtext.Text = (string)this.Resources["RunInstall_Converting"]; //提示转换中
+                    this.DialogWithOKToCloseDialogDonate.IsOpen = true;
+                    this.DialogWithOKToCloseDialogDonateTitle.Text = (string)this.Resources["CompleteTitle"]; //完成标题
+                    this.DialogWithOKToCloseDialogDonateText.Text = (string)this.Resources["DonateTextConverted"]; //完成转换内容
+                }));
+                //MessageBox.Show("Congratulation!");
+            }
+            DelectTempFile();
+            //清理文件
+        }
+
+        private void RunUpgradeFullVersion()
+        {
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.DialogActProg.IsOpen = true;
+                this.activatingtext.Text = (string)this.Resources["RunUpgradeFullVersion_Upgrading"]; //提示升级中
+            }));
+            RunCMD(@"sc start sppsvc");
+            RunCMD(@"sc start wuauserv");
+            RunCLI("ChangePK.exe", ".", "/ProductKey VK7JG-NPHTM-C97JM-9MPGT-3V66T"); // Pro
+            RunCLI("ChangePK.exe", ".", "/ProductKey 2B87N-8KFHP-DKV6R-Y2C8J-PKCKT"); // Pro N
+            RunCLI("ChangePK.exe", ".", "/ProductKey W269N-WFGWX-YVC9B-4J6C9-T83GX"); // KMS Pro
+            RunCLI("ChangePK.exe", ".", "/ProductKey MH37W-N47XK-V7XM9-C7227-GCQG9"); // KMS Pro N
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.DialogActProg.IsOpen = false;
+            }));
+        }
+
+        private void ShowBallSameDig()
+        {
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                if (Program.hiderun == true && Program.autoact == true)
+                {
+                    int tipShowMilliseconds = 0;
+                    string tipTitle = (string)this.Resources["notifyIconTitle"];
+                    string tipContent = this.activatingtext.Text;
+                    ToolTipIcon tipType = ToolTipIcon.None;
+                    notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                }
+            }));
+        }
+
+        private void RunAct()
+        {
+            bool is_not_network_to_act = false; //是否无法联网稍后激活
+            ExportTempFile();
+            //释放文件
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.DialogActProg.IsOpen = true;
+                this.activatingtext.Text = (string)this.Resources["RunAct_Activating"]; //提示激活中
+                ShowBallSameDig();
+            }));
+
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+
+            string code = "-0";
+            string key = "00000-00000-00000-00000-00000";
+            string sku = "0";
+            string msg = "Unknow Error!";
+            string system = "";
+            string mode = "1"; //1:普通(SYS、SKU、KEY完全);2.需要获取SKU(SYS、KEY);3.手动输入KEY;4.普通OfflineKMS(SYS、SKU、KEY完全)
+
+            string slmgr = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86) + "\\slmgr.vbs";
+
+            string slmgr_self = tempfile + "slmgr.vbs";
+
+            try
+            {
+                string sourceFile = slmgr;
+                string targetFile = slmgr_self;
+                bool isrewrite = true; // true=覆盖已存在的同名文件,false则反之
+                ConsoleLog("Copy Start: " + sourceFile + " To " + targetFile);
+                System.IO.File.Copy(sourceFile, targetFile, isrewrite);
+                ConsoleLog("Copy Completed.");
+            }
+            catch (Exception CopyExc)
+            {
+                ConsoleLog("Copy has Exception: " + CopyExc.Message);
+            }
+
+            //旧的位置
+            //string slmgr_self = System.AppDomain.CurrentDomain.BaseDirectory + "slmgr.vbs";
+
+            string changepk = Environment.SystemDirectory + "\\changepk.exe";
+
+            if (is_auto == true)
+            {
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    system = this.SystemEditionText.Text;
+                }));
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.activatingtext.Text = (string)this.Resources["RunAct_Getting_Key"]; //提示正在获取密钥
+                    ShowBallSameDig();
+                }));
+
+                //获取密钥和SKU
+                try
+                {
+
+                    string json;
+                    try
+                    {
+                        json = GetHttpWebRequest(MainServerDomain + "/api/digital?list=0&ver=3"); // 主要服务器
+                    }
+                    catch (Exception e)
+                    {
+                        ConsoleLog("MainServer:" + MainServerDomain + " is not working.");
+                        ConsoleLog("Error Message:" + e.Message);
+                        ConsoleLog("Ready to use BackupServer:" + BackupServerDomain);
+                        json = GetHttpWebRequest(BackupServerDomain + "/api/digital?list=0&ver=3"); // 备用服务器
+                    }
+                    JObject jsonobj = JObject.Parse(json);
+                    List<Frequency> list = new List<Frequency>();
+                    ositems = (JArray)jsonobj["OS"];
+                    key = jsonobj[system]["key"].ToString();
+                    sku = jsonobj[system]["sku"].ToString();
+                    ConsoleLog("Edition:" + system + "\r\nKEY:" + key + "\r\nSKU:" + sku);
+
+                    string selecos = "";
+                    // 获取当前选择的选择的文本
+                    actbtn.Dispatcher.Invoke(new Action(() =>
+                    {
+                        selecos = SystemEditionText.Text;
+                    }));
+
+                    ConsoleLog("Selected OS: " + selecos);
+
+                    if (sku == "unknow")
+                    {
+                        mode = "2";
+                    }
+
+                    if (selecos.ToUpper().StartsWith("(Offline-KMS)".ToUpper()))
+                    {
+                        ConsoleLog("Switch Mode Offline-KMS");
+                        mode = "4";
+                    }
+
+                }
+                catch
+                {
+                    code = "-0";
+                    msg = (string)this.Resources["ErrorMsg-0"]; // "激活Windows10需要网络获取产品密钥 :) \nActivate Windows 10 requires a network to gets the product key :)";
+                    goto EndLine;
+                }
+
+            }
+            else
+            {
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    key = this.SystemEditionTextInput.Text;
+                }));
+                mode = "3";
+                sku = "unknow";
+
+            }
+
+            actbtn.Dispatcher.Invoke(new Action(() =>
+            {
+                this.activatingtext.Text = (string)this.Resources["RunAct_Uninstalling_old_Key"]; //提示正在卸载旧密钥
+                ShowBallSameDig();
+            }));
+
+            //卸载
+            string runend = RunCScript(slmgr_self, "-upk").Trim();
+            //string runend = RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -upk").Trim();
+            ConsoleLog(runend);
+            if (runend.EndsWith("successfully.") || runend.EndsWith("not found."))
+            {
+
+                RunCScript(slmgr_self, "-ckms").Trim();
+
+                if (mode == "4")
+                {
+                    //长期KMS
+                    RunCMD(@"sc stop sppsvc");
+
+                    RunCMD(@"del /F /Q %systemroot%\system32\spp\store\2.0\tokens.dat");
+                    RunCMD(@"del /F /Q %systemroot%\system32\spp\store\2.0\data.dat");
+                    RunCMD(@"del /F /Q %systemroot%\system32\spp\store\2.0\cache\cache.dat");
+
+                    RunCMD(@"sc start sppsvc");
+                }
+
+                if (sku == "unknow")//if (mode == "2" || mode == "3") //获取SKU
+                {
+
+                    actbtn.Dispatcher.Invoke(new Action(() =>
+                    {
+                        this.activatingtext.Text = (string)this.Resources["RunAct_Getting_edition_code_Exp"]; // "Getting edition code (Experimental)";
+                        ShowBallSameDig();
+                    }));
+
+                    //安装转换密钥
+                    runend = RunCScript(slmgr_self, "-ipk " + key);
+                    //runend = RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -ipk " + key);
+                    ConsoleLog(slmgr_self + " -ipk " + key);
+                    ConsoleLog(runend);
+                    if (runend.Trim().EndsWith("successfully."))
+                    {
+                        Thread.Sleep(6000); //等待6秒,确保SKU生效
+                        sku = GetSKU(); //获取SKU
+                        if (sku != "Error")
+                        {
+                            actbtn.Dispatcher.Invoke(new Action(() =>
+                            {
+                                this.activatingtext.Text = (string)this.Resources["RunAct_Uninstalling_old_Key_Exp"]; //提示正在卸载旧密钥(实验性)
+                                ShowBallSameDig();
+                            }));
+
+                            runend = RunCScript(slmgr_self, "-upk").Trim();
+                            //runend = RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -upk").Trim();
+                            ConsoleLog(runend);
+                            if (runend.EndsWith("successfully.") || runend.EndsWith("not found."))
+                            {
+                                actbtn.Dispatcher.Invoke(new Action(() =>
+                                {
+                                    this.activatingtext.Text = (string)this.Resources["RunAct_Prepare_for_the_next_step_Exp"]; // "Prepare for the next step (Experimental)";
+                                    ShowBallSameDig();
+                                }));
+                            }
+                        }
+                        else
+                        {
+                            code = "-1.2";
+                            msg = (string)this.Resources["ErrorMsg-1.2"]; // "无法获取版本代号 :(\nCannot to get edition code. :(";
+                            goto EndLine;
+                        }
+                    }
+                    else
+                    {
+                        code = "-1.1";
+                        msg = (string)this.Resources["ErrorMsg-1.1"]; // "无法安装密钥,可能没有选择或输入正确的版本 :(\nCannot to install key, may be you choose or enter a incorrect version. :(";
+                        goto EndLine;
+                    }
+                }
+
+                //写入Win7特征
+                //ChangePKAction(changepk + " /ProductKey " + key);
+
+                if (mode == "4")
+                {
+                    //长期KMS
+                    ConsoleLog(RunCScript(slmgr_self, "-skms 1.1.45.14:1919").Trim()); // いいよ、来いよ www
+                    //ConsoleLog(RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -skms 1.1.45.14:1919").Trim()); // いいよ、来いよ www
+                    //if (runend.EndsWith("successfully."))
+                    //{
+                    //}
+                }
+
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.activatingtext.Text = (string)this.Resources["RunAct_Installing_Key"]; //提示正在安装密钥
+                    ShowBallSameDig();
+                }));
+
+                //安装数字权利升级密钥
+                runend = RunCScript(slmgr_self, "-ipk " + key);
+                //runend = RunCMD(@"cscript.exe /nologo %systemroot%\system32\slmgr.vbs -ipk " + key);
+                ConsoleLog(slmgr_self + " -ipk " + key);
+                ConsoleLog(runend);
+                if (runend.Trim().EndsWith("successfully."))
+                {
+
+                    actbtn.Dispatcher.Invoke(new Action(() =>
+                    {
+                        this.activatingtext.Text = (string)this.Resources["RunAct_Getting_free_upgrade_permissions"]; // "Getting free upgrade permissions";
+                        ShowBallSameDig();
+                    }));
+
+                    //LibGatherOsState.GatherOsState.SetLibHWIDPath(tempfile + "LibHWIDx86.dll", tempfile + "LibHWIDx64.dll");
+
+                    var licenseType = LibGatherOsState.GatherOsState.LicenseType.Retail;
+
+                    if (mode == "4")
+                    {
+                        //长期KMS
+                        licenseType = LibGatherOsState.GatherOsState.LicenseType.GVLK;
+                    }
+
+                    var result = LibGatherOsState.GatherOsState.GenActivateLicenseXML(licenseType);
+
+                    if (result.state == LibGatherOsState.GatherOsState.ActivateLicenseXMLResultState.OK)
+                    {
+                        File.WriteAllText(tempfile + "GenuineTicket.xml", result.xml, Encoding.UTF8);
+                        ConsoleLog("进入下一步");
+
+                        int try_max_count = 30;
+                        for (int i = 0; i < try_max_count + 1 && !File.Exists(tempfile + "GenuineTicket.xml"); i++)
+                        {
+                            Thread.Sleep(1000);
+                            ConsoleLog($"检查许可证 重试 {i}/{try_max_count}");
+                        }
+                    }
+
+                    if (File.Exists(tempfile + "GenuineTicket.xml"))
+                    {
+                        actbtn.Dispatcher.Invoke(new Action(() =>
+                        {
+                            this.activatingtext.Text = (string)this.Resources["RunAct_Getting_digital_license"]; // "Getting digital license";
+                            ShowBallSameDig();
+                        }));
+
+                        RunCMD(@"sc start wuauserv");
+                        RunCMD(@"sc start clipsvc");
+
+                        RunCMD(@"clipup -v -o -altto " + tempfile);
+                        RunCMD(@"clipup -v -o -altto " + tempfile.TrimEnd('\\')); // 旧版本系统的 ClipUp 路径不能带最后的反斜杠
+                        if (OSVersionInfo.BuildVersion >= 20348)
+                        {
+                            RunCLI(tempfile + "ClipUp.exe", ".", "-v -o -altto " + tempfile); // 固定版本解决 22H2 后 ARM64 许可证接收问题
+                            RunCLI(tempfile + "ClipUp.exe", ".", "-v -o -altto " + tempfile.TrimEnd('\\'));
+                        }
+
+                        actbtn.Dispatcher.Invoke(new Action(() =>
+                        {
+                            this.activatingtext.Text = (string)this.Resources["RunAct_Activating"]; // 提示激活中
+                            ShowBallSameDig();
+                        }));
+
+                        int try_max_count = 30;
+                        for (int i = 0; i < try_max_count + 1 && File.Exists(tempfile + "GenuineTicket.xml"); i++)
+                        {
+                            Thread.Sleep(1000);
+                            ConsoleLog($"应用许可证 重试 {i}/{try_max_count}");
+                        }
+
+                        runend = RunCScript(slmgr_self, "-ato").Trim();
+
+                        ConsoleLog(runend);
+                        if (runend.EndsWith("successfully.") || runend.Contains("0xC004F074") || runend.Contains("0xC004C003")) //0xC004F074 是 KMS38 长期激活会出的提示,Error 0xC004C003: The activation server determined that the specified product key is blocked. 是因为未连接激活服务器,下次连接时会自动激活。
+                        {
+                            if (runend.Contains("0xC004C003"))
+                            {
+                                is_not_network_to_act = true;
+                            }
+                            code = "200";
+                        }
+                        else
+                        {
+                            code = "-4";
+                            msg = (string)this.Resources["ErrorMsg-4"] + "\r\n" + (string)this.Resources["SysMsg"] + "\r\n" + runend; // "激活失败 :(\nActivation Failed. :(";
+                        }
+                    }
+                    else
+                    {
+                        code = "-3";
+                        msg = (string)this.Resources["ErrorMsg-3"]; // "执行超时,可能没有选择正确或输入的版本 :(\nTime out, may be you choose or enter a incorrect version. :(";
+                    }
+                }
+                else
+                {
+                    code = "-2";
+                    msg = (string)this.Resources["ErrorMsg-2"]; // "无法安装密钥,可能没有选择或输入正确的版本 :(\nCannot to install key, may be you choose or enter a incorrect version. :(";
+                }
+            }
+            else
+            {
+                code = "-1";
+                msg = (string)this.Resources["ErrorMsg-1"]; // "无法卸载旧密钥 :(\nCannot to uninstall old key. :(";
+            }
+        //string runend = RunCScript(slmgr_self, "-upk").Trim();
+        EndLine:;
+            if (code != "200")
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.DialogActProg.IsOpen = false;
+                    this.activatingtext.Text = (string)this.Resources["RunAct_Activating"]; //提示激活中
+                    this.DialogWithOKToCloseDialog.IsOpen = true;
+                    this.DialogWithOKToCloseDialogTitle.Text = (string)this.Resources["ErrorTitle"]; //错误标题
+                    this.DialogWithOKToCloseDialogText.Text = msg + "\r\n" + (string)this.Resources["ErrorCode"] + code; //错误代码 如:错误信息\r\nCode:000
+                    if (Program.hiderun == true && Program.autoact == true)
+                    {
+                        int tipShowMilliseconds = 0;
+                        string tipTitle = (string)this.Resources["notifyIconTitle"];
+                        string tipContent = msg;
+                        ToolTipIcon tipType = ToolTipIcon.None;
+                        notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                        Exit_Button_Click(null, null);
+                    }
+                }));
+                //MessageBox.Show(msg + "\r\nCode:" + code);
+            }
+            else
+            {
+                actbtn.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.DialogActProg.IsOpen = false;
+                    this.activatingtext.Text = (string)this.Resources["RunAct_Activating"]; //提示激活中
+                    this.DialogWithOKToCloseDialogDonate.IsOpen = true;
+                    this.DialogWithOKToCloseDialogDonateTitle.Text = (string)this.Resources["CompleteTitle"]; //完成标题
+                    if (is_not_network_to_act == true)
+                    {
+                        this.DialogWithOKToCloseDialogDonateText.Text = (string)this.Resources["DonateTextWillActivated"]; //即将激活内容
+                    }
+                    else
+                    {
+                        this.DialogWithOKToCloseDialogDonateText.Text = (string)this.Resources["DonateTextActivated"]; //完成激活内容
+                    }
+
+                    if (Program.hiderun == true && Program.autoact == true)
+                    {
+                        int tipShowMilliseconds = 0;
+                        string tipTitle = (string)this.Resources["notifyIconTitle"];
+                        string tipContent = this.DialogWithOKToCloseDialogDonateText.Text;
+                        ToolTipIcon tipType = ToolTipIcon.None;
+                        notifyIcon.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
+                        Exit_Button_Click(null, null);
+                    }
+                }));
+                //MessageBox.Show("Congratulation!");
+            }
+            DelectTempFile();
+            //清理文件
+        }
+
+        private void RunCMD_old(string var)
+        {
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+            System.Diagnostics.Process p = new System.Diagnostics.Process();
+            p.StartInfo.FileName = "cmd.exe";//要执行的程序名称 
+            p.StartInfo.WorkingDirectory = System.AppDomain.CurrentDomain.BaseDirectory;
+            p.StartInfo.UseShellExecute = false;
+            p.StartInfo.RedirectStandardInput = true;//可能接受来自调用程序的输入信息 
+            p.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息 
+            p.StartInfo.CreateNoWindow = true;//不显示程序窗口 
+            p.Start();//启动程序 
+                      //向CMD窗口发送输入信息: 
+            p.StandardInput.WriteLine(var);
+            ConsoleLog(var);
+            //p.WaitForExit();
+            ConsoleLog(p.StandardOutput.ReadToEnd().Trim());
+            p.Close();
+
+            //Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+            //System.Diagnostics.Process.Start(var);
+        }
+
+        public static string RunCLI(string path, string wdPath, string var = "")
+        {
+            ConsoleLog(path + " " + var);
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+                                                 //执行命令行函数
+            try
+            {
+                System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
+                myProcess.StartInfo.FileName = path;//要执行的程序名称 
+                myProcess.StartInfo.UseShellExecute = false;
+                myProcess.StartInfo.RedirectStandardInput = true;//可能接受来自调用程序的输入信息 
+                myProcess.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息 
+                myProcess.StartInfo.CreateNoWindow = true;//不显示程序窗口 
+                myProcess.StartInfo.Arguments = var;
+                myProcess.StartInfo.WorkingDirectory = wdPath;
+                //myProcess.Arguments = "/c chcp 65001 > nul && cmd /c \"" + PHPRuntimePath + "\" \"" + path + "\" " + var;
+                //myProcess.Arguments = "/c " & Commands
+                //myProcess.StartInfo.StandardOutputEncoding = Encoding.UTF8;
+                myProcess.Start();
+                myProcess.WaitForExit(60 * 1000);
+                StreamReader myStreamReader = myProcess.StandardOutput;
+                string myString = myStreamReader.ReadToEnd();
+                myProcess.Close();
+                ConsoleLog(myString.Trim());
+                ConsoleLog("执行完毕");
+                return myString.Trim();
+            }
+            catch
+            {
+                return "Error";
+            }
+        }
+
+        public static string RunCMD(string var)
+        {
+            ConsoleLog(var);
+            Wow64EnableWow64FsRedirection(false); //关闭文件重定向
+            //执行命令行函数
+            try
+            {
+                System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
+                myProcess.StartInfo.FileName = "cmd.exe";//要执行的程序名称 
+                myProcess.StartInfo.UseShellExecute = false;
+                myProcess.StartInfo.RedirectStandardInput = true;//可能接受来自调用程序的输入信息 
+                myProcess.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息 
+                myProcess.StartInfo.CreateNoWindow = true;//不显示程序窗口 
+                myProcess.StartInfo.Arguments = "/c chcp 437 > nul && cmd /c \"" + var + "\"";
+                //myProcess.Arguments = "/c chcp 65001 > nul && cmd /c \"" + PHPRuntimePath + "\" \"" + path + "\" " + var;
+                //myProcess.Arguments = "/c " & Commands
+                //myProcess.StartInfo.StandardOutputEncoding = Encoding.UTF8;
+                myProcess.Start();
+                myProcess.WaitForExit(60 * 1000);
+                System.IO.StreamReader myStreamReader = myProcess.StandardOutput;
+                string myString = myStreamReader.ReadToEnd();
+                myProcess.Close();
+                ConsoleLog(myString.Trim());
+                return myString.Trim();
+            }
+            catch
+            {
+                return "Error";
+            }
+        }
+
+        public static string RunCScript(string path, string var = "")
+        {
+            ConsoleLog("CScript" + " " + "//Nologo \"" + path + "\" " + var);
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+            //执行命令行函数
+            try
+            {
+                System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
+                System.Diagnostics.ProcessStartInfo ProcessStartInfo = new System.Diagnostics.ProcessStartInfo("CScript", "//Nologo \"" + path + "\" " + var);
+                ProcessStartInfo.UseShellExecute = false;
+                ProcessStartInfo.RedirectStandardOutput = true;
+                ProcessStartInfo.CreateNoWindow = true;
+                //myProcessStartInfo.Arguments = "/c chcp 65001 > nul && cmd /c \"" + PHPRuntimePath + "\" \"" + path + "\" " + var;
+                //myProcessStartInfo.Arguments = "/c " & Commands
+                ProcessStartInfo.StandardOutputEncoding = Encoding.UTF8;
+                myProcess.StartInfo = ProcessStartInfo;
+                myProcess.Start();
+                myProcess.WaitForExit(60 * 1000);
+                System.IO.StreamReader myStreamReader = myProcess.StandardOutput;
+                string myString = myStreamReader.ReadToEnd();
+                myProcess.Close();
+                ConsoleLog(myString.Trim());
+                return myString.Trim();
+            }
+            catch
+            {
+                return "Error";
+            }
+        }
+
+        public static string GetSKU()
+        {
+            ConsoleLog("Geting SKU");
+            Wow64EnableWow64FsRedirection(false);//关闭文件重定向
+            //执行命令行函数
+            try
+            {
+                System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
+                myProcess.StartInfo.FileName = "cmd.exe";//要执行的程序名称 
+                myProcess.StartInfo.UseShellExecute = false;
+                myProcess.StartInfo.RedirectStandardOutput = true;
+                myProcess.StartInfo.CreateNoWindow = true;
+                myProcess.StartInfo.Arguments = "/c wmic os get OperatingSystemSKU";
+                //myProcess.Arguments = "/c chcp 65001 > nul && cmd /c \"" + PHPRuntimePath + "\" \"" + path + "\" " + var;
+                //myProcess.Arguments = "/c " & Commands
+                myProcess.StartInfo.StandardOutputEncoding = Encoding.UTF8;
+                myProcess.Start();
+                myProcess.WaitForExit(60 * 1000);
+                System.IO.StreamReader myStreamReader = myProcess.StandardOutput;
+                string myString = myStreamReader.ReadToEnd();
+                myProcess.Close();
+                myString = Regex.Replace(myString, @"[^0-9]+", "");
+                ConsoleLog("Get SKU:\"" + myString.Trim() + "\"");
+                return myString.Trim(); //只保留数字SKU
+            }
+            catch
+            {
+                return "Error";
+            }
+        }
+
+        private void Donate_Button_Click(object sender, RoutedEventArgs e)
+        {
+            System.Diagnostics.Process.Start("https://cmwtat.cloudmoe.com/donate"); // 打开捐赠页
+            this.DialogWithOKToCloseDialogDonate.IsOpen = false;
+        }
+
+        string last_key = "";
+
+        private void SystemEditionTextInput_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if (SystemEditionTextInput.Text != last_key)
+            {
+                int selectlen = SystemEditionTextInput.SelectionStart;
+                string temp = SystemEditionTextInput.Text;
+                temp = Regex.Replace(temp, @"[^a-zA-Z0-9]+", "");//XAML禁用输入法,并替换可能粘贴进的意外字符
+                temp = Regex.Replace(temp, @"([a-zA-Z0-9]{5}(?!$))", "$1-");
+                //temp = string.Join("-", Regex.Matches(temp, @".....").Cast<Match>().ToList());
+                SystemEditionTextInput.Text = temp.ToUpper();
+                last_key = SystemEditionTextInput.Text;
+                SystemEditionTextInput.SelectionStart = SystemEditionTextInput.Text.Length;
+            }
+            UpdateInputMatch(); // 更新按钮启用状态
+        }
+
+        /// <summary>  
+        /// 验证产品密钥字符串是否匹配正则表达式描述的规则并更新按钮状态(如果自动模式则启用按钮)
+        /// </summary>  
+        private void UpdateInputMatch()
+        {
+            //防止初始化前访问null出错
+            try
+            {
+                if (actbtn != null)
+                {
+                    string pattern = @"^[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}$";
+                    if (is_auto == false)
+                    {
+                        if (CmwtatDigital.Domain.IsSN.IsMatch((SystemEditionTextInput.Text ?? "").ToString(), pattern))
+                        {
+                            actbtn.IsEnabled = true;
+                            installbtn.IsEnabled = true;
+                        }
+                        else
+                        {
+                            actbtn.IsEnabled = false;
+                            installbtn.IsEnabled = false;
+                        }
+                    }
+                    else
+                    {
+                        actbtn.IsEnabled = true;
+                        installbtn.IsEnabled = true;
+                    }
+                }
+            }
+            catch { }
+        }
+
+        private void A_RadioButton_Checked(object sender, RoutedEventArgs e)
+        {
+            SystemEditionText.Visibility = Visibility.Visible;
+            SystemEditionTextInput.Visibility = Visibility.Hidden;
+            is_auto = true;
+            UpdateInputMatch(); // 更新按钮启用状态
+        }
+
+        private void M_RadioButton_Checked(object sender, RoutedEventArgs e)
+        {
+            SystemEditionText.Visibility = Visibility.Hidden;
+            SystemEditionTextInput.Visibility = Visibility.Visible;
+            is_auto = false;
+            UpdateInputMatch(); // 更新按钮启用状态
+        }
+
+        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+        {
+            DelectTempFile();
+            notifyIcon.Visible = false;
+        }
+
+        private void UpdateBtn_Click(object sender, RoutedEventArgs e)
+        {
+            System.Diagnostics.Process.Start("https://cmwtat.cloudmoe.com"); // 打开官网
+        }
+
+        private void Window_Activated(object sender, EventArgs e)
+        {
+            CheckWindowsTheme();
+            ApplyBase(isDark); // 应用颜色
+        }
+    }
+}

+ 1089 - 0
CmwtatDigital/OSVersionInfoClass.cs

@@ -0,0 +1,1089 @@
+using Microsoft.Win32;
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+// http://www.codeproject.com/Articles/73000/Getting-Operating-System-Version-Info-Even-for-Win
+//https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions
+
+//Thanks to Member 7861383, Scott Vickery for the Windows 8.1 update and workaround.
+//I have moved it to the beginning of the Name property, though...
+
+//Thakts to Brisingr Aerowing for help with the Windows 10 adapatation
+
+namespace OSVersionInfoClass
+{
+    /// <summary>
+    /// Provides detailed information about the host operating system.
+    /// </summary>
+    public static class OSVersionInfo
+    {
+        #region ENUMS
+        public enum SoftwareArchitecture
+        {
+            Unknown = 0,
+            Bit32 = 1,
+            Bit64 = 2
+        }
+
+        public enum ProcessorArchitecture
+        {
+            Unknown = 0,
+            Bit32 = 1,
+            Bit64 = 2,
+            Itanium64 = 3
+        }
+        #endregion ENUMS
+
+        #region DELEGATE DECLARATION
+        private delegate bool IsWow64ProcessDelegate([In] IntPtr handle, [Out] out bool isWow64Process);
+        #endregion DELEGATE DECLARATION
+
+        #region BITS
+        /// <summary>
+        /// Determines if the current application is 32 or 64-bit.
+        /// </summary>
+        static public SoftwareArchitecture ProgramBits
+        {
+            get
+            {
+                SoftwareArchitecture pbits = SoftwareArchitecture.Unknown;
+
+                System.Collections.IDictionary test = Environment.GetEnvironmentVariables();
+
+                switch (IntPtr.Size * 8)
+                {
+                    case 64:
+                        pbits = SoftwareArchitecture.Bit64;
+                        break;
+
+                    case 32:
+                        pbits = SoftwareArchitecture.Bit32;
+                        break;
+
+                    default:
+                        pbits = SoftwareArchitecture.Unknown;
+                        break;
+                }
+
+                return pbits;
+            }
+        }
+
+        static public SoftwareArchitecture OSBits
+        {
+            get
+            {
+                SoftwareArchitecture osbits = SoftwareArchitecture.Unknown;
+
+                switch (IntPtr.Size * 8)
+                {
+                    case 64:
+                        osbits = SoftwareArchitecture.Bit64;
+                        break;
+
+                    case 32:
+                        if (Is32BitProcessOn64BitProcessor())
+                            osbits = SoftwareArchitecture.Bit64;
+                        else
+                            osbits = SoftwareArchitecture.Bit32;
+                        break;
+
+                    default:
+                        osbits = SoftwareArchitecture.Unknown;
+                        break;
+                }
+
+                return osbits;
+            }
+        }
+
+        /// <summary>
+        /// Determines if the current processor is 32 or 64-bit.
+        /// </summary>
+        static public ProcessorArchitecture ProcessorBits
+        {
+            get
+            {
+                ProcessorArchitecture pbits = ProcessorArchitecture.Unknown;
+
+                try
+                {
+                    SYSTEM_INFO l_System_Info = new SYSTEM_INFO();
+                    GetNativeSystemInfo(ref l_System_Info);
+
+                    switch (l_System_Info.uProcessorInfo.wProcessorArchitecture)
+                    {
+                        case 9: // PROCESSOR_ARCHITECTURE_AMD64
+                            pbits = ProcessorArchitecture.Bit64;
+                            break;
+                        case 6: // PROCESSOR_ARCHITECTURE_IA64
+                            pbits = ProcessorArchitecture.Itanium64;
+                            break;
+                        case 0: // PROCESSOR_ARCHITECTURE_INTEL
+                            pbits = ProcessorArchitecture.Bit32;
+                            break;
+                        default: // PROCESSOR_ARCHITECTURE_UNKNOWN
+                            pbits = ProcessorArchitecture.Unknown;
+                            break;
+                    }
+                }
+                catch
+                {
+                    // Ignore        
+                }
+
+                return pbits;
+            }
+        }
+        #endregion BITS
+
+        #region EDITION
+        static private string s_Edition;
+        /// <summary>
+        /// Gets the edition of the operating system running on this computer.
+        /// </summary>
+        static public string Edition
+        {
+            get
+            {
+                if (s_Edition != null)
+                    return s_Edition;  //***** RETURN *****//
+
+                string edition = String.Empty;
+
+                OperatingSystem osVersion = Environment.OSVersion;
+                OSVERSIONINFOEX osVersionInfo = new OSVERSIONINFOEX();
+                osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX));
+
+                if (GetVersionEx(ref osVersionInfo))
+                {
+                    int majorVersion = osVersion.Version.Major;
+                    int minorVersion = osVersion.Version.Minor;
+                    byte productType = osVersionInfo.wProductType;
+                    short suiteMask = osVersionInfo.wSuiteMask;
+
+                    #region VERSION 4
+                    if (majorVersion == 4)
+                    {
+                        if (productType == VER_NT_WORKSTATION)
+                        {
+                            // Windows NT 4.0 Workstation
+                            edition = "Workstation";
+                        }
+                        else if (productType == VER_NT_SERVER)
+                        {
+                            if ((suiteMask & VER_SUITE_ENTERPRISE) != 0)
+                            {
+                                // Windows NT 4.0 Server Enterprise
+                                edition = "Enterprise Server";
+                            }
+                            else
+                            {
+                                // Windows NT 4.0 Server
+                                edition = "Standard Server";
+                            }
+                        }
+                    }
+                    #endregion VERSION 4
+
+                    #region VERSION 5
+                    else if (majorVersion == 5)
+                    {
+                        if (productType == VER_NT_WORKSTATION)
+                        {
+                            if ((suiteMask & VER_SUITE_PERSONAL) != 0)
+                            {
+                                edition = "Home";
+                            }
+                            else
+                            {
+                                if (GetSystemMetrics(86) == 0) // 86 == SM_TABLETPC
+                                    edition = "Professional";
+                                else
+                                    edition = "Tablet Edition";
+                            }
+                        }
+                        else if (productType == VER_NT_SERVER)
+                        {
+                            if (minorVersion == 0)
+                            {
+                                if ((suiteMask & VER_SUITE_DATACENTER) != 0)
+                                {
+                                    // Windows 2000 Datacenter Server
+                                    edition = "Datacenter Server";
+                                }
+                                else if ((suiteMask & VER_SUITE_ENTERPRISE) != 0)
+                                {
+                                    // Windows 2000 Advanced Server
+                                    edition = "Advanced Server";
+                                }
+                                else
+                                {
+                                    // Windows 2000 Server
+                                    edition = "Server";
+                                }
+                            }
+                            else
+                            {
+                                if ((suiteMask & VER_SUITE_DATACENTER) != 0)
+                                {
+                                    // Windows Server 2003 Datacenter Edition
+                                    edition = "Datacenter";
+                                }
+                                else if ((suiteMask & VER_SUITE_ENTERPRISE) != 0)
+                                {
+                                    // Windows Server 2003 Enterprise Edition
+                                    edition = "Enterprise";
+                                }
+                                else if ((suiteMask & VER_SUITE_BLADE) != 0)
+                                {
+                                    // Windows Server 2003 Web Edition
+                                    edition = "Web Edition";
+                                }
+                                else
+                                {
+                                    // Windows Server 2003 Standard Edition
+                                    edition = "Standard";
+                                }
+                            }
+                        }
+                    }
+                    #endregion VERSION 5
+
+                    #region VERSION 6
+                    else if (majorVersion == 6)
+                    {
+                        int ed;
+                        if (GetProductInfo(majorVersion, minorVersion,
+                            osVersionInfo.wServicePackMajor, osVersionInfo.wServicePackMinor,
+                            out ed))
+                        {
+                            switch (ed)
+                            {
+                                case PRODUCT_BUSINESS:
+                                    edition = "Business";
+                                    break;
+                                case PRODUCT_BUSINESS_N:
+                                    edition = "Business N";
+                                    break;
+                                case PRODUCT_CLUSTER_SERVER:
+                                    edition = "HPC Edition";
+                                    break;
+                                case PRODUCT_CLUSTER_SERVER_V:
+                                    edition = "HPC Edition without Hyper-V";
+                                    break;
+                                case PRODUCT_DATACENTER_SERVER:
+                                    edition = "Datacenter Server";
+                                    break;
+                                case PRODUCT_DATACENTER_SERVER_CORE:
+                                    edition = "Datacenter Server (core installation)";
+                                    break;
+                                case PRODUCT_DATACENTER_SERVER_V:
+                                    edition = "Datacenter Server without Hyper-V";
+                                    break;
+                                case PRODUCT_DATACENTER_SERVER_CORE_V:
+                                    edition = "Datacenter Server without Hyper-V (core installation)";
+                                    break;
+                                case PRODUCT_EMBEDDED:
+                                    edition = "Embedded";
+                                    break;
+                                case PRODUCT_ENTERPRISE:
+                                    edition = "Enterprise";
+                                    break;
+                                case PRODUCT_ENTERPRISE_N:
+                                    edition = "Enterprise N";
+                                    break;
+                                case PRODUCT_ENTERPRISE_E:
+                                    edition = "Enterprise E";
+                                    break;
+                                case PRODUCT_ENTERPRISE_SERVER:
+                                    edition = "Enterprise Server";
+                                    break;
+                                case PRODUCT_ENTERPRISE_SERVER_CORE:
+                                    edition = "Enterprise Server (core installation)";
+                                    break;
+                                case PRODUCT_ENTERPRISE_SERVER_CORE_V:
+                                    edition = "Enterprise Server without Hyper-V (core installation)";
+                                    break;
+                                case PRODUCT_ENTERPRISE_SERVER_IA64:
+                                    edition = "Enterprise Server for Itanium-based Systems";
+                                    break;
+                                case PRODUCT_ENTERPRISE_SERVER_V:
+                                    edition = "Enterprise Server without Hyper-V";
+                                    break;
+                                case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT:
+                                    edition = "Essential Business Server MGMT";
+                                    break;
+                                case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL:
+                                    edition = "Essential Business Server ADDL";
+                                    break;
+                                case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC:
+                                    edition = "Essential Business Server MGMTSVC";
+                                    break;
+                                case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC:
+                                    edition = "Essential Business Server ADDLSVC";
+                                    break;
+                                case PRODUCT_HOME_BASIC:
+                                    edition = "Home Basic";
+                                    break;
+                                case PRODUCT_HOME_BASIC_N:
+                                    edition = "Home Basic N";
+                                    break;
+                                case PRODUCT_HOME_BASIC_E:
+                                    edition = "Home Basic E";
+                                    break;
+                                case PRODUCT_HOME_PREMIUM:
+                                    edition = "Home Premium";
+                                    break;
+                                case PRODUCT_HOME_PREMIUM_N:
+                                    edition = "Home Premium N";
+                                    break;
+                                case PRODUCT_HOME_PREMIUM_E:
+                                    edition = "Home Premium E";
+                                    break;
+                                case PRODUCT_HOME_PREMIUM_SERVER:
+                                    edition = "Home Premium Server";
+                                    break;
+                                case PRODUCT_HYPERV:
+                                    edition = "Microsoft Hyper-V Server";
+                                    break;
+                                case PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT:
+                                    edition = "Windows Essential Business Management Server";
+                                    break;
+                                case PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING:
+                                    edition = "Windows Essential Business Messaging Server";
+                                    break;
+                                case PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY:
+                                    edition = "Windows Essential Business Security Server";
+                                    break;
+                                case PRODUCT_PROFESSIONAL:
+                                    edition = "Professional";
+                                    break;
+                                case PRODUCT_PROFESSIONAL_N:
+                                    edition = "Professional N";
+                                    break;
+                                case PRODUCT_PROFESSIONAL_E:
+                                    edition = "Professional E";
+                                    break;
+                                case PRODUCT_SB_SOLUTION_SERVER:
+                                    edition = "SB Solution Server";
+                                    break;
+                                case PRODUCT_SB_SOLUTION_SERVER_EM:
+                                    edition = "SB Solution Server EM";
+                                    break;
+                                case PRODUCT_SERVER_FOR_SB_SOLUTIONS:
+                                    edition = "Server for SB Solutions";
+                                    break;
+                                case PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM:
+                                    edition = "Server for SB Solutions EM";
+                                    break;
+                                case PRODUCT_SERVER_FOR_SMALLBUSINESS:
+                                    edition = "Windows Essential Server Solutions";
+                                    break;
+                                case PRODUCT_SERVER_FOR_SMALLBUSINESS_V:
+                                    edition = "Windows Essential Server Solutions without Hyper-V";
+                                    break;
+                                case PRODUCT_SERVER_FOUNDATION:
+                                    edition = "Server Foundation";
+                                    break;
+                                case PRODUCT_SMALLBUSINESS_SERVER:
+                                    edition = "Windows Small Business Server";
+                                    break;
+                                case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
+                                    edition = "Windows Small Business Server Premium";
+                                    break;
+                                case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE:
+                                    edition = "Windows Small Business Server Premium (core installation)";
+                                    break;
+                                case PRODUCT_SOLUTION_EMBEDDEDSERVER:
+                                    edition = "Solution Embedded Server";
+                                    break;
+                                case PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE:
+                                    edition = "Solution Embedded Server (core installation)";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER:
+                                    edition = "Standard Server";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER_CORE:
+                                    edition = "Standard Server (core installation)";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER_SOLUTIONS:
+                                    edition = "Standard Server Solutions";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE:
+                                    edition = "Standard Server Solutions (core installation)";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER_CORE_V:
+                                    edition = "Standard Server without Hyper-V (core installation)";
+                                    break;
+                                case PRODUCT_STANDARD_SERVER_V:
+                                    edition = "Standard Server without Hyper-V";
+                                    break;
+                                case PRODUCT_STARTER:
+                                    edition = "Starter";
+                                    break;
+                                case PRODUCT_STARTER_N:
+                                    edition = "Starter N";
+                                    break;
+                                case PRODUCT_STARTER_E:
+                                    edition = "Starter E";
+                                    break;
+                                case PRODUCT_STORAGE_ENTERPRISE_SERVER:
+                                    edition = "Enterprise Storage Server";
+                                    break;
+                                case PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE:
+                                    edition = "Enterprise Storage Server (core installation)";
+                                    break;
+                                case PRODUCT_STORAGE_EXPRESS_SERVER:
+                                    edition = "Express Storage Server";
+                                    break;
+                                case PRODUCT_STORAGE_EXPRESS_SERVER_CORE:
+                                    edition = "Express Storage Server (core installation)";
+                                    break;
+                                case PRODUCT_STORAGE_STANDARD_SERVER:
+                                    edition = "Standard Storage Server";
+                                    break;
+                                case PRODUCT_STORAGE_STANDARD_SERVER_CORE:
+                                    edition = "Standard Storage Server (core installation)";
+                                    break;
+                                case PRODUCT_STORAGE_WORKGROUP_SERVER:
+                                    edition = "Workgroup Storage Server";
+                                    break;
+                                case PRODUCT_STORAGE_WORKGROUP_SERVER_CORE:
+                                    edition = "Workgroup Storage Server (core installation)";
+                                    break;
+                                case PRODUCT_UNDEFINED:
+                                    edition = "Unknown product";
+                                    break;
+                                case PRODUCT_ULTIMATE:
+                                    edition = "Ultimate";
+                                    break;
+                                case PRODUCT_ULTIMATE_N:
+                                    edition = "Ultimate N";
+                                    break;
+                                case PRODUCT_ULTIMATE_E:
+                                    edition = "Ultimate E";
+                                    break;
+                                case PRODUCT_WEB_SERVER:
+                                    edition = "Web Server";
+                                    break;
+                                case PRODUCT_WEB_SERVER_CORE:
+                                    edition = "Web Server (core installation)";
+                                    break;
+                            }
+                        }
+                    }
+                    #endregion VERSION 6
+                }
+
+                s_Edition = edition;
+                return edition;
+            }
+        }
+        #endregion EDITION
+
+        #region NAME
+        static private string s_Name;
+        /// <summary>
+        /// Gets the name of the operating system running on this computer.
+        /// </summary>
+        static public string Name
+        {
+            get
+            {
+                if (s_Name != null)
+                    return s_Name;  //***** RETURN *****//
+
+                string name = "unknown";
+
+                OperatingSystem osVersion = Environment.OSVersion;
+                OSVERSIONINFOEX osVersionInfo = new OSVERSIONINFOEX();
+                osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX));
+
+                if (GetVersionEx(ref osVersionInfo))
+                {
+                    int majorVersion = osVersion.Version.Major;
+                    int minorVersion = osVersion.Version.Minor;
+
+                    if (majorVersion == 6 && minorVersion == 2)
+                    {
+                        //The registry read workaround is by Scott Vickery. Thanks a lot for the help!
+
+                        //http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
+
+                        // For applications that have been manifested for Windows 8.1 & Windows 10. Applications not manifested for 8.1 or 10 will return the Windows 8 OS version value (6.2). 
+                        // By reading the registry, we'll get the exact version - meaning we can even compare against  Win 8 and Win 8.1.
+                        string exactVersion = RegistryRead(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion", "");
+                        if (!string.IsNullOrEmpty(exactVersion))
+                        {
+                            string[] splitResult = exactVersion.Split('.');
+                            majorVersion = Convert.ToInt32(splitResult[0]);
+                            minorVersion = Convert.ToInt32(splitResult[1]);
+                        }
+                        if (IsWindows10())
+                        {
+                            majorVersion = 10;
+                            minorVersion = 0;
+                        }
+                    }
+
+                    switch (osVersion.Platform)
+                    {
+                        case PlatformID.Win32S:
+                            name = "Windows 3.1";
+                            break;
+                        case PlatformID.WinCE:
+                            name = "Windows CE";
+                            break;
+                        case PlatformID.Win32Windows:
+                            {
+                                if (majorVersion == 4)
+                                {
+                                    string csdVersion = osVersionInfo.szCSDVersion;
+                                    switch (minorVersion)
+                                    {
+                                        case 0:
+                                            if (csdVersion == "B" || csdVersion == "C")
+                                                name = "Windows 95 OSR2";
+                                            else
+                                                name = "Windows 95";
+                                            break;
+                                        case 10:
+                                            if (csdVersion == "A")
+                                                name = "Windows 98 Second Edition";
+                                            else
+                                                name = "Windows 98";
+                                            break;
+                                        case 90:
+                                            name = "Windows Me";
+                                            break;
+                                    }
+                                }
+                                break;
+                            }
+                        case PlatformID.Win32NT:
+                            {
+                                byte productType = osVersionInfo.wProductType;
+
+                                switch (majorVersion)
+                                {
+                                    case 3:
+                                        name = "Windows NT 3.51";
+                                        break;
+                                    case 4:
+                                        switch (productType)
+                                        {
+                                            case 1:
+                                                name = "Windows NT 4.0";
+                                                break;
+                                            case 3:
+                                                name = "Windows NT 4.0 Server";
+                                                break;
+                                        }
+                                        break;
+                                    case 5:
+                                        switch (minorVersion)
+                                        {
+                                            case 0:
+                                                name = "Windows 2000";
+                                                break;
+                                            case 1:
+                                                name = "Windows XP";
+                                                break;
+                                            case 2:
+                                                name = "Windows Server 2003";
+                                                break;
+                                        }
+                                        break;
+                                    case 6:
+                                        switch (minorVersion)
+                                        {
+                                            case 0:
+                                                switch (productType)
+                                                {
+                                                    case 1:
+                                                        name = "Windows Vista";
+                                                        break;
+                                                    case 3:
+                                                        name = "Windows Server 2008";
+                                                        break;
+                                                }
+                                                break;
+
+                                            case 1:
+                                                switch (productType)
+                                                {
+                                                    case 1:
+                                                        name = "Windows 7";
+                                                        break;
+                                                    case 3:
+                                                        name = "Windows Server 2008 R2";
+                                                        break;
+                                                }
+                                                break;
+                                            case 2:
+                                                switch (productType)
+                                                {
+                                                    case 1:
+                                                        name = "Windows 8";
+                                                        break;
+                                                    case 3:
+                                                        name = "Windows Server 2012";
+                                                        break;
+                                                }
+                                                break;
+                                            case 3:
+                                                switch (productType)
+                                                {
+                                                    case 1:
+                                                        name = "Windows 8.1";
+                                                        break;
+                                                    case 3:
+                                                        name = "Windows Server 2012 R2";
+                                                        break;
+                                                }
+                                                break;
+                                        }
+                                        break;
+                                    case 10:
+                                        switch (minorVersion)
+                                        {
+                                            case 0:
+                                                switch (productType)
+                                                {
+                                                    case 1:
+                                                        name = "Windows 10";
+                                                        break;
+                                                    case 3:
+                                                        name = "Windows Server 2016";
+                                                        break;
+                                                }
+                                                break;
+                                        }
+                                        break;
+                                }
+                                break;
+                            }
+                    }
+                }
+
+                s_Name = name;
+                return name;
+            }
+        }
+        #endregion NAME
+
+        #region PINVOKE
+
+        #region GET
+        #region PRODUCT INFO
+        [DllImport("Kernel32.dll")]
+        internal static extern bool GetProductInfo(
+            int osMajorVersion,
+            int osMinorVersion,
+            int spMajorVersion,
+            int spMinorVersion,
+            out int edition);
+        #endregion PRODUCT INFO
+
+        #region VERSION
+        [DllImport("kernel32.dll")]
+        private static extern bool GetVersionEx(ref OSVERSIONINFOEX osVersionInfo);
+        #endregion VERSION
+
+        #region SYSTEMMETRICS
+        [DllImport("user32")]
+        public static extern int GetSystemMetrics(int nIndex);
+        #endregion SYSTEMMETRICS
+
+        #region SYSTEMINFO
+        [DllImport("kernel32.dll")]
+        public static extern void GetSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);
+
+        [DllImport("kernel32.dll")]
+        public static extern void GetNativeSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);
+        #endregion SYSTEMINFO
+
+        #endregion GET
+
+        #region OSVERSIONINFOEX
+        [StructLayout(LayoutKind.Sequential)]
+        private struct OSVERSIONINFOEX
+        {
+            public int dwOSVersionInfoSize;
+            public int dwMajorVersion;
+            public int dwMinorVersion;
+            public int dwBuildNumber;
+            public int dwPlatformId;
+            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+            public string szCSDVersion;
+            public short wServicePackMajor;
+            public short wServicePackMinor;
+            public short wSuiteMask;
+            public byte wProductType;
+            public byte wReserved;
+        }
+        #endregion OSVERSIONINFOEX
+
+        #region SYSTEM_INFO
+        [StructLayout(LayoutKind.Sequential)]
+        public struct SYSTEM_INFO
+        {
+            internal _PROCESSOR_INFO_UNION uProcessorInfo;
+            public uint dwPageSize;
+            public IntPtr lpMinimumApplicationAddress;
+            public IntPtr lpMaximumApplicationAddress;
+            public IntPtr dwActiveProcessorMask;
+            public uint dwNumberOfProcessors;
+            public uint dwProcessorType;
+            public uint dwAllocationGranularity;
+            public ushort dwProcessorLevel;
+            public ushort dwProcessorRevision;
+        }
+        #endregion SYSTEM_INFO
+
+        #region _PROCESSOR_INFO_UNION
+        [StructLayout(LayoutKind.Explicit)]
+        public struct _PROCESSOR_INFO_UNION
+        {
+            [FieldOffset(0)]
+            internal uint dwOemId;
+            [FieldOffset(0)]
+            internal ushort wProcessorArchitecture;
+            [FieldOffset(2)]
+            internal ushort wReserved;
+        }
+        #endregion _PROCESSOR_INFO_UNION
+
+        #region 64 BIT OS DETECTION
+        [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
+        public extern static IntPtr LoadLibrary(string libraryName);
+
+        [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
+        public extern static IntPtr GetProcAddress(IntPtr hwnd, string procedureName);
+        #endregion 64 BIT OS DETECTION
+
+        #region PRODUCT
+        private const int PRODUCT_UNDEFINED = 0x00000000;
+        private const int PRODUCT_ULTIMATE = 0x00000001;
+        private const int PRODUCT_HOME_BASIC = 0x00000002;
+        private const int PRODUCT_HOME_PREMIUM = 0x00000003;
+        private const int PRODUCT_ENTERPRISE = 0x00000004;
+        private const int PRODUCT_HOME_BASIC_N = 0x00000005;
+        private const int PRODUCT_BUSINESS = 0x00000006;
+        private const int PRODUCT_STANDARD_SERVER = 0x00000007;
+        private const int PRODUCT_DATACENTER_SERVER = 0x00000008;
+        private const int PRODUCT_SMALLBUSINESS_SERVER = 0x00000009;
+        private const int PRODUCT_ENTERPRISE_SERVER = 0x0000000A;
+        private const int PRODUCT_STARTER = 0x0000000B;
+        private const int PRODUCT_DATACENTER_SERVER_CORE = 0x0000000C;
+        private const int PRODUCT_STANDARD_SERVER_CORE = 0x0000000D;
+        private const int PRODUCT_ENTERPRISE_SERVER_CORE = 0x0000000E;
+        private const int PRODUCT_ENTERPRISE_SERVER_IA64 = 0x0000000F;
+        private const int PRODUCT_BUSINESS_N = 0x00000010;
+        private const int PRODUCT_WEB_SERVER = 0x00000011;
+        private const int PRODUCT_CLUSTER_SERVER = 0x00000012;
+        private const int PRODUCT_HOME_SERVER = 0x00000013;
+        private const int PRODUCT_STORAGE_EXPRESS_SERVER = 0x00000014;
+        private const int PRODUCT_STORAGE_STANDARD_SERVER = 0x00000015;
+        private const int PRODUCT_STORAGE_WORKGROUP_SERVER = 0x00000016;
+        private const int PRODUCT_STORAGE_ENTERPRISE_SERVER = 0x00000017;
+        private const int PRODUCT_SERVER_FOR_SMALLBUSINESS = 0x00000018;
+        private const int PRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 0x00000019;
+        private const int PRODUCT_HOME_PREMIUM_N = 0x0000001A;
+        private const int PRODUCT_ENTERPRISE_N = 0x0000001B;
+        private const int PRODUCT_ULTIMATE_N = 0x0000001C;
+        private const int PRODUCT_WEB_SERVER_CORE = 0x0000001D;
+        private const int PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT = 0x0000001E;
+        private const int PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY = 0x0000001F;
+        private const int PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING = 0x00000020;
+        private const int PRODUCT_SERVER_FOUNDATION = 0x00000021;
+        private const int PRODUCT_HOME_PREMIUM_SERVER = 0x00000022;
+        private const int PRODUCT_SERVER_FOR_SMALLBUSINESS_V = 0x00000023;
+        private const int PRODUCT_STANDARD_SERVER_V = 0x00000024;
+        private const int PRODUCT_DATACENTER_SERVER_V = 0x00000025;
+        private const int PRODUCT_ENTERPRISE_SERVER_V = 0x00000026;
+        private const int PRODUCT_DATACENTER_SERVER_CORE_V = 0x00000027;
+        private const int PRODUCT_STANDARD_SERVER_CORE_V = 0x00000028;
+        private const int PRODUCT_ENTERPRISE_SERVER_CORE_V = 0x00000029;
+        private const int PRODUCT_HYPERV = 0x0000002A;
+        private const int PRODUCT_STORAGE_EXPRESS_SERVER_CORE = 0x0000002B;
+        private const int PRODUCT_STORAGE_STANDARD_SERVER_CORE = 0x0000002C;
+        private const int PRODUCT_STORAGE_WORKGROUP_SERVER_CORE = 0x0000002D;
+        private const int PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE = 0x0000002E;
+        private const int PRODUCT_STARTER_N = 0x0000002F;
+        private const int PRODUCT_PROFESSIONAL = 0x00000030;
+        private const int PRODUCT_PROFESSIONAL_N = 0x00000031;
+        private const int PRODUCT_SB_SOLUTION_SERVER = 0x00000032;
+        private const int PRODUCT_SERVER_FOR_SB_SOLUTIONS = 0x00000033;
+        private const int PRODUCT_STANDARD_SERVER_SOLUTIONS = 0x00000034;
+        private const int PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE = 0x00000035;
+        private const int PRODUCT_SB_SOLUTION_SERVER_EM = 0x00000036;
+        private const int PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM = 0x00000037;
+        private const int PRODUCT_SOLUTION_EMBEDDEDSERVER = 0x00000038;
+        private const int PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE = 0x00000039;
+        //private const int ???? = 0x0000003A;
+        private const int PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT = 0x0000003B;
+        private const int PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL = 0x0000003C;
+        private const int PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC = 0x0000003D;
+        private const int PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC = 0x0000003E;
+        private const int PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE = 0x0000003F;
+        private const int PRODUCT_CLUSTER_SERVER_V = 0x00000040;
+        private const int PRODUCT_EMBEDDED = 0x00000041;
+        private const int PRODUCT_STARTER_E = 0x00000042;
+        private const int PRODUCT_HOME_BASIC_E = 0x00000043;
+        private const int PRODUCT_HOME_PREMIUM_E = 0x00000044;
+        private const int PRODUCT_PROFESSIONAL_E = 0x00000045;
+        private const int PRODUCT_ENTERPRISE_E = 0x00000046;
+        private const int PRODUCT_ULTIMATE_E = 0x00000047;
+        //private const int PRODUCT_UNLICENSED = 0xABCDABCD;
+        #endregion PRODUCT
+
+        #region VERSIONS
+        private const int VER_NT_WORKSTATION = 1;
+        private const int VER_NT_DOMAIN_CONTROLLER = 2;
+        private const int VER_NT_SERVER = 3;
+        private const int VER_SUITE_SMALLBUSINESS = 1;
+        private const int VER_SUITE_ENTERPRISE = 2;
+        private const int VER_SUITE_TERMINAL = 16;
+        private const int VER_SUITE_DATACENTER = 128;
+        private const int VER_SUITE_SINGLEUSERTS = 256;
+        private const int VER_SUITE_PERSONAL = 512;
+        private const int VER_SUITE_BLADE = 1024;
+        #endregion VERSIONS
+
+        #endregion PINVOKE
+
+        #region SERVICE PACK
+        /// <summary>
+        /// Gets the service pack information of the operating system running on this computer.
+        /// </summary>
+        static public string ServicePack
+        {
+            get
+            {
+                string servicePack = String.Empty;
+                OSVERSIONINFOEX osVersionInfo = new OSVERSIONINFOEX();
+
+                osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX));
+
+                if (GetVersionEx(ref osVersionInfo))
+                {
+                    servicePack = osVersionInfo.szCSDVersion;
+                }
+
+                return servicePack;
+            }
+        }
+        #endregion SERVICE PACK
+
+        #region VERSION
+        #region BUILD
+        /// <summary>
+        /// Gets the build version number of the operating system running on this computer.
+        /// </summary>
+        static public int BuildVersion
+        {
+            get
+            {
+                return int.Parse(RegistryRead(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentBuildNumber", "0"));
+            }
+        }
+        #endregion BUILD
+
+        #region FULL
+        #region STRING
+        /// <summary>
+        /// Gets the full version string of the operating system running on this computer.
+        /// </summary>
+        static public string VersionString
+        {
+            get
+            {
+                return Version.ToString();
+            }
+        }
+        #endregion STRING
+
+        #region VERSION
+        /// <summary>
+        /// Gets the full version of the operating system running on this computer.
+        /// </summary>
+        static public Version Version
+        {
+            get
+            {
+                return new Version(MajorVersion, MinorVersion, BuildVersion, RevisionVersion);
+            }
+        }
+        #endregion VERSION
+        #endregion FULL
+
+        #region MAJOR
+        /// <summary>
+        /// Gets the major version number of the operating system running on this computer.
+        /// </summary>
+        static public int MajorVersion
+        {
+            get
+            {
+                if(IsWindows10())
+                {
+                    return 10;
+                }
+                string exactVersion = RegistryRead(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion", "");
+                if(!string.IsNullOrEmpty(exactVersion))
+                {
+                    string[] splitVersion = exactVersion.Split('.');
+                    return int.Parse(splitVersion[0]);
+                }
+                return Environment.OSVersion.Version.Major;
+            }
+        }
+        #endregion MAJOR
+
+        #region MINOR
+        /// <summary>
+        /// Gets the minor version number of the operating system running on this computer.
+        /// </summary>
+        static public int MinorVersion
+        {
+            get
+            {
+                if (IsWindows10())
+                {
+                    return 0;
+                }
+                string exactVersion = RegistryRead(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion", "");
+                if (!string.IsNullOrEmpty(exactVersion))
+                {
+                    string[] splitVersion = exactVersion.Split('.');
+                    return int.Parse(splitVersion[1]);
+                }
+                return Environment.OSVersion.Version.Minor;
+            }
+        }
+        #endregion MINOR
+
+        #region REVISION
+        /// <summary>
+        /// Gets the revision version number of the operating system running on this computer.
+        /// </summary>
+        static public int RevisionVersion
+        {
+            get
+            {
+                if(IsWindows10())
+                {
+                    return 0;
+                }
+                return Environment.OSVersion.Version.Revision;
+            }
+        }
+        #endregion REVISION
+        #endregion VERSION
+
+        #region 64 BIT OS DETECTION
+        private static IsWow64ProcessDelegate GetIsWow64ProcessDelegate()
+        {
+            IntPtr handle = LoadLibrary("kernel32");
+
+            if (handle != IntPtr.Zero)
+            {
+                IntPtr fnPtr = GetProcAddress(handle, "IsWow64Process");
+
+                if (fnPtr != IntPtr.Zero)
+                {
+                    return (IsWow64ProcessDelegate)Marshal.GetDelegateForFunctionPointer((IntPtr)fnPtr, typeof(IsWow64ProcessDelegate));
+                }
+            }
+
+            return null;
+        }
+
+        private static bool Is32BitProcessOn64BitProcessor()
+        {
+            IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate();
+
+            if (fnDelegate == null)
+            {
+                return false;
+            }
+
+            bool isWow64;
+            bool retVal = fnDelegate.Invoke(Process.GetCurrentProcess().Handle, out isWow64);
+
+            if (retVal == false)
+            {
+                return false;
+            }
+
+            return isWow64;
+        }
+        #endregion 64 BIT OS DETECTION
+
+        #region Windows 10 Detection
+
+        private static bool IsWindows10()
+        {
+            string productName = RegistryRead(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName", "");
+            if (productName.StartsWith("Windows 10", StringComparison.OrdinalIgnoreCase))
+            {
+                return true;
+            }
+            return false;
+        }
+
+        #endregion
+
+        #region Registry Methods
+
+        private static string RegistryRead(string RegistryPath, string Field, string DefaultValue)
+        {
+            string rtn = "";
+            string backSlash = "";
+            string newRegistryPath = "";
+
+            try
+            {
+                RegistryKey OurKey = null;
+                string[] split_result = RegistryPath.Split('\\');
+
+                if (split_result.Length > 0)
+                {
+                    split_result[0] = split_result[0].ToUpper();        // Make the first entry uppercase...
+
+                    if (split_result[0] == "HKEY_CLASSES_ROOT") OurKey = Registry.ClassesRoot;
+                    else if (split_result[0] == "HKEY_CURRENT_USER") OurKey = Registry.CurrentUser;
+                    else if (split_result[0] == "HKEY_LOCAL_MACHINE") OurKey = Registry.LocalMachine;
+                    else if (split_result[0] == "HKEY_USERS") OurKey = Registry.Users;
+                    else if (split_result[0] == "HKEY_CURRENT_CONFIG") OurKey = Registry.CurrentConfig;
+
+                    if (OurKey != null)
+                    {
+                        for (int i = 1; i < split_result.Length; i++)
+                        {
+                            newRegistryPath += backSlash + split_result[i];
+                            backSlash = "\\";
+                        }
+
+                        if (newRegistryPath != "")
+                        {
+                            //rtn = (string)Registry.GetValue(RegistryPath, "CurrentVersion", DefaultValue);
+
+                            OurKey = OurKey.OpenSubKey(newRegistryPath);
+                            rtn = (string)OurKey.GetValue(Field, DefaultValue);
+                            OurKey.Close();
+                        }
+                    }
+                }
+            }
+            catch { }
+
+            return rtn;
+        }
+
+        #endregion Registry Methods
+    }
+}

+ 91 - 0
CmwtatDigital/Program.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace CmwtatDigital
+{
+    public static class Program
+    {
+
+        public static bool autoact = false;
+        public static bool hiderun = false;
+        public static bool expact = false;
+        public static bool log2file = false;
+        public static bool showhelp = false;
+
+        /// <summary>
+        /// Application Entry Point.
+        /// </summary>
+        [System.STAThreadAttribute()]
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+
+        public static void Main(string[] startup_args)
+        {
+            var loadedAssemblies = new Dictionary<string, Assembly>();
+            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
+            {
+                String resourceName = "CmwtatDigital.Res." +
+                new AssemblyName(args.Name).Name + ".dll";
+
+                //Must return the EXACT same assembly, do not reload from a new stream
+                if (loadedAssemblies.TryGetValue(resourceName, out Assembly loadedAssembly))
+                {
+                    return loadedAssembly;
+                }
+
+                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
+                {
+                    if (stream == null)
+                        return null;
+                    Byte[] assemblyData = new Byte[stream.Length];
+
+                    stream.Read(assemblyData, 0, assemblyData.Length);
+
+                    var assembly = Assembly.Load(assemblyData);
+                    loadedAssemblies[resourceName] = assembly;
+                    return assembly;
+                }
+            };
+
+            foreach (string arg in startup_args)
+            {
+                Console.WriteLine("arg: " + arg);
+                if (arg == "-a" || arg == "--auto")
+                {
+                    Console.WriteLine("AUTO: True");
+                    autoact = true;
+                }
+                if (arg == "-h" || arg == "--hide")
+                {
+                    Console.WriteLine("HIDE: True");
+                    hiderun = true;
+                }
+                if (arg == "-e" || arg == "--expact")
+                {
+                    Console.WriteLine("EXPACT: True");
+                    expact = true;
+                }
+                if (arg == "-l" || arg == "--log")
+                {
+                    Console.WriteLine("LOG: True");
+                    log2file = true;
+                }
+                if (arg == "-?" || arg == "--help")
+                {
+                    Console.WriteLine("SHOWHELP: True");
+                    showhelp = true;
+                }
+            }
+
+            CmwtatDigital.App app = new CmwtatDigital.App();//WPF项目的Application实例,用来启动WPF项目的
+            app.InitializeComponent();
+            app.Run();
+        }
+    }
+}

+ 55 - 0
CmwtatDigital/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("CMWTAT Digital Edition V2")]
+[assembly: AssemblyDescription("CloudMoe Windows 10 Activation Toolkit V2")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("CloudMoe Network")]
+[assembly: AssemblyProduct("CMWTAT Digital Edition V2")]
+[assembly: AssemblyCopyright("Copyright © CloudMoe Saltfish Studio 2022")]
+[assembly: AssemblyTrademark("CloudMoe Saltfish Studio")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
+//例如,如果您在源文件中使用的是美国英语,
+//使用的是美国英语,请将 <UICulture> 设置为 en-US。  然后取消
+//对以下 NeutralResourceLanguage 特性的注释。  更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+                                     //(未在页面中找到资源时使用,
+                                     //或应用程序资源字典中找到时使用)
+    ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+                                              //(未在页面中找到资源时使用,
+                                              //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.6.3.0")]
+[assembly: AssemblyFileVersion("2.6.3.0")]

+ 130 - 0
CmwtatDigital/Properties/Resources.resx

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="ClipUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Res\clipup.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="CMWTAT_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\CMWTAT.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="slmgr" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Res\slmgr.vbs;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>

+ 30 - 0
CmwtatDigital/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace CmwtatDigital.Properties 
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
CmwtatDigital/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 3 - 0
CmwtatDigital/app.config

@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>

+ 74 - 0
CmwtatDigital/app.manifest

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <!-- UAC 清单选项
+             如果想要更改 Windows 用户帐户控制级别,请使用
+             以下节点之一替换 requestedExecutionLevel 节点。n
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
+        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
+
+            指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
+            如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
+            元素。
+        -->
+        <requestedExecutionLevel level="highestAvailable" uiAccess="false" />
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
+           Windows 版本的列表。取消评论适当的元素,Windows 将
+           自动选择最兼容的环境。 -->
+
+      <!-- Windows Vista -->
+      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
+
+      <!-- Windows 7 -->
+      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
+
+      <!-- Windows 8 -->
+      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
+
+      <!-- Windows 8.1 -->
+      <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
+
+      <!-- Windows 10 -->
+      <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
+
+    </application>
+  </compatibility>
+
+  <!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
+       自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
+       选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
+       在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
+  
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+    </windowsSettings>
+  </application>
+
+  <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
+  <!--
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity
+          type="win32"
+          name="Microsoft.Windows.Common-Controls"
+          version="6.0.0.0"
+          processorArchitecture="*"
+          publicKeyToken="6595b64144ccf1df"
+          language="*"
+        />
+    </dependentAssembly>
+  </dependency>
+  -->
+
+</assembly>

+ 6 - 0
CmwtatDigital/packages.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="MaterialDesignColors" version="2.0.6" targetFramework="net452" />
+  <package id="MaterialDesignThemes" version="4.5.0" targetFramework="net452" />
+  <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
+</packages>

+ 342 - 0
LICENSE

@@ -0,0 +1,342 @@
+GNU GENERAL PUBLIC LICENSE
+
+Copyright (c) 2018 TGSAN
+
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    
+    Copyright (C) 2018  TGSAN
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  {signature of Ty Coon}, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

+ 81 - 0
README.md

@@ -0,0 +1,81 @@
+# Official Site 官方网站
+
+[https://cmwtat.cloudmoe.com]
+
+# CloudMoe Windows 10+ Activation Toolkit Digital Edition
+
+This toolkit can activate your Windows 10 and Windows 11 use digital license.
+
+一款使用`CSharp`编写的 `Windows 10` 和 `Windows 11` 数字权利激活工具。
+
+![UI界面截图][UI_image]
+
+# Usage 使用
+
+## Getting started 入门
+
+### 使用自动模式激活 `Windows 10` 或 `Windows 11`
+
+##### English Version
+
+1. Download release `.exe` file.
+
+2. Run it.
+
+3. Click `Activate` button.
+
+4. Enjoy it :)
+
+
+## Advanced 进阶
+
+### 在不同版本 `Windows` 之间转换
+
+* 注意: 目前已知 `Windows` 的 `专业版(Professional)`、`专业工作站版(ProfessionalWorkstation)`、`教育版(Education)`、`专业教育版(ProfessionalEducation)`、`企业版(Enterprise)` 之间可以进行互相转换(N版本与LTSB版本除外),而这些版本与`家庭版(Core)`均不能直接一键转换,如需转换请使用 2.6 版本新增的 `升级到完整版 Windows` 功能或使用 `Windows设置` 中的 `更改产品密钥` 功能进行升级。
+
+##### `Auto Mode` 自动模式
+
+1. 运行它。
+
+2. 选择 `Auto Mode` 。
+
+3. 在下拉列表中选择要升级到的版本。
+
+4. 点按 `Convert Versions` 按钮。
+
+5. 完成。
+
+##### `Manual Mode` 手动模式
+
+1. 运行它。
+
+2. 选择 `Manual Mode` 。
+
+3. 输入框中输入需要升级到的版本对应的OEM零售密钥(不需要产品包装上的激活密钥,而是微软官方分配的密钥,如专业版对应密钥为 `VK7JG-NPHTM-C97JM-9MPGT-3V66T`)。
+
+4. 点按 `Activate` 按钮。
+
+5. 完成。
+
+### 通过 `Manual Mode` 手动模式激活不在列表中的 `Windows` 版本
+
+* 注意:  此方法不适用于某些版本的激活,如 `专业教育版(ProfessionalEducation)` ,即使你输入了对应的OEM零售密钥。
+
+1. 运行它。
+
+2. 选择 `Manual Mode` 。
+
+3. 输入框中输入需要升级到的版本对应的OEM零售密钥(不需要产品包装上的激活密钥,而是微软官方分配的密钥,如专业版对应密钥为 `VK7JG-NPHTM-C97JM-9MPGT-3V66T`)。
+
+4. 点按 `Convert Versions` 按钮。
+
+5. 完成。
+
+## Startup Parameters 启动参数
+
+```
+-?  --help            启动后弹出启动参数帮助对话框。
+-a  --auto            启动后自动激活系统。
+-e  --expact          自动激活系统时允许使用实验性方案。(需要与 -a 或 --auto 配合使用)
+-h  --hide            以隐藏模式启动,激活进度以通知形式显示。(需要与 -a 或 --auto 配合使用)
+```

+ 15 - 0
_config.yml

@@ -0,0 +1,15 @@
+theme: jekyll-theme-cayman
+show_downloads: false
+title: CloudMoe Windows 10  Toolkit Digital Edition
+description: CloudMoe Windows 10 Acivation Toolkit get digital license, the best open source Win 10 activator in GitHub. <br>GitHub 上最棒的开源 Win10 数字权利(数字许可证)激活工具!
+# SEORelate
+google_site_verification :
+bing_site_verification   :
+alexa_site_verification  :
+yandex_site_verification :
+tags: [Digital License, Windows 10 Acivation Toolkit, Activator]
+navbar-links:
+  Resources:
+    - Learn markdown: "http://www.markdowntutorial.com/"
+    - GitHub Pages: "https://pages.github.com/"
+  

File diff suppressed because it is too large
+ 18 - 0
cmwtat.cloudmoe.com.http


Some files were not shown because too many files changed in this diff