-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdvanced.cs
118 lines (98 loc) · 3.72 KB
/
Advanced.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace activator
{
public partial class Advanced : Form
{
public Advanced()
{
InitializeComponent();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
customKMS_value.Enabled = customKMS.Checked;
}
private void startActivation_Click(object sender, EventArgs e)
{
var productKey = kms_KEY_VALUE.Text;
string strCmdLine =
"/c slmgr /skms kms8.msguides.com" +
"slmgr /ipk " + productKey +
"slmgr /ato";
if (fullActivation.Checked)
{
Process SetServer = new Process();
SetServer.StartInfo.FileName = "CMD.exe";
SetServer.StartInfo.Arguments = "/c slmgr /skms kms8.msguides.com";
SetServer.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
SetServer.Start();
SetServer.WaitForExit();
Process SetKey = new Process();
SetKey.StartInfo.FileName = "CMD.exe";
SetKey.StartInfo.Arguments = "/c slmgr /ipk " + productKey;
SetKey.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
SetKey.Start();
SetKey.WaitForExit();
Process Activate = new Process();
Activate.StartInfo.FileName = "CMD.exe";
Activate.StartInfo.Arguments = "/c slmgr /ato";
Activate.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
Activate.Start();
Activate.WaitForExit();
}
if (limitedActivation.Checked)
{
Process SetServer = new Process();
SetServer.StartInfo.FileName = "CMD.exe";
SetServer.StartInfo.Arguments = "/c slmgr /skms kms8.msguides.com";
SetServer.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
SetServer.Start();
SetServer.WaitForExit();
Process SetKey = new Process();
SetKey.StartInfo.FileName = "CMD.exe";
SetKey.StartInfo.Arguments = "/c slmgr /ipk " + productKey;
SetKey.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
SetKey.Start();
SetKey.WaitForExit();
}
MessageBox.Show(
"Activation has completed and you now need to restart your computer. If there was an error, you may have selected the incorrect edition.",
"Activation Finished",
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
Application.Exit();
}
private void cancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void homeBtn_Click(object sender, EventArgs e)
{
kms_KEY_VALUE.Text = "TX9XD-98N7V-6WMQ6-BX7FG-H8Q99";
}
private void ProBtn_Click(object sender, EventArgs e)
{
kms_KEY_VALUE.Text = "W269N-WFGWX-YVC9B-4J6C9-T83GX";
}
private void EnterpriseBtn_Click(object sender, EventArgs e)
{
kms_KEY_VALUE.Text = "NPPR9-FWDCX-D2C8J-H872K-2YT43";
}
private void fullActivation_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}