@@ -365,8 +365,7 @@ public MainWindow()
365
365
DataContext = new ViewModel ( ) ;
366
366
367
367
this . DialogHostGrid . Visibility = Visibility . Visible ;
368
-
369
- //MessageBox.Show(@"reg add ""HKLM\SYSTEM\Tokens\"" /v ""Channel"" /t REG_SZ /d ""Retail"" /f");
368
+
370
369
DialogWait . IsOpen = true ;
371
370
try
372
371
{
@@ -1119,12 +1118,6 @@ private void RunAct()
1119
1118
//写入Win7特征
1120
1119
//ChangePKAction(changepk + " /ProductKey " + key);
1121
1120
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
-
1128
1121
if ( mode == "4" )
1129
1122
{
1130
1123
//长期KMS
@@ -1133,16 +1126,8 @@ private void RunAct()
1133
1126
//if (runend.EndsWith("successfully."))
1134
1127
//{
1135
1128
//}
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" ) ;
1141
1129
}
1142
1130
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
-
1146
1131
actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
1147
1132
{
1148
1133
this . activatingtext . Text = ( string ) this . Resources [ "RunAct_Installing_Key" ] ; //提示正在安装密钥
@@ -1244,21 +1229,6 @@ private void RunAct()
1244
1229
}
1245
1230
//string runend = RunCScript(slmgr_self, "-upk").Trim();
1246
1231
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
- }
1262
1232
if ( code != "200" )
1263
1233
{
1264
1234
actbtn . Dispatcher . Invoke ( new Action ( ( ) =>
0 commit comments