@@ -365,8 +365,7 @@ public MainWindow()
365365 DataContext = new ViewModel ( ) ;
366366
367367 this . DialogHostGrid . Visibility = Visibility . Visible ;
368-
369- //MessageBox.Show(@"reg add ""HKLM\SYSTEM\Tokens\"" /v ""Channel"" /t REG_SZ /d ""Retail"" /f");
368+
370369 DialogWait . IsOpen = true ;
371370 try
372371 {
@@ -1119,12 +1118,6 @@ private void RunAct()
11191118 //写入Win7特征
11201119 //ChangePKAction(changepk + " /ProductKey " + key);
11211120
1122- actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
1123- {
1124- this . activatingtext . Text = ( string ) this . Resources [ "RunAct_Writing_old_OS" ] ; // "Writing feature of old Windows version";
1125- ShowBallSameDig ( ) ;
1126- } ) ) ;
1127-
11281121 if ( mode == "4" )
11291122 {
11301123 //长期KMS
@@ -1133,16 +1126,8 @@ private void RunAct()
11331126 //if (runend.EndsWith("successfully."))
11341127 //{
11351128 //}
1136- RunCMD ( @"reg add ""HKLM\SYSTEM\Tokens"" /v ""Channel"" /t REG_SZ /d ""Volume:GVLK"" /f" ) ;
1137- }
1138- else
1139- {
1140- RunCMD ( @"reg add ""HKLM\SYSTEM\Tokens"" /v ""Channel"" /t REG_SZ /d ""Retail"" /f" ) ;
11411129 }
11421130
1143- RunCMD ( @"reg add ""HKLM\SYSTEM\Tokens\Kernel"" /v ""Kernel-ProductInfo"" /t REG_DWORD /d " + sku + " /f" ) ;
1144- RunCMD ( @"reg add ""HKLM\SYSTEM\Tokens\Kernel"" /v ""Security-SPP-GenuineLocalStatus"" /t REG_DWORD /d 1 /f" ) ;
1145-
11461131 actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
11471132 {
11481133 this . activatingtext . Text = ( string ) this . Resources [ "RunAct_Installing_Key" ] ; //提示正在安装密钥
@@ -1244,21 +1229,6 @@ private void RunAct()
12441229 }
12451230 //string runend = RunCScript(slmgr_self, "-upk").Trim();
12461231 EndLine : ;
1247- // 此处确保注册表清理一定进行
1248- try
1249- {
1250- actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
1251- {
1252- this . activatingtext . Text = ( string ) this . Resources [ "RunAct_Cleaning_changes" ] ; // "Cleaning changes";
1253- ShowBallSameDig ( ) ;
1254- } ) ) ;
1255-
1256- RunCMD ( @"reg delete ""HKLM\SYSTEM\Tokens"" /f" ) ;
1257- }
1258- catch
1259- {
1260- ConsoleLog ( "Delete Reg Error" ) ;
1261- }
12621232 if ( code != "200" )
12631233 {
12641234 actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
0 commit comments