diff --git a/Server/Core/Build/ClientBuilder.cs b/Server/Core/Build/ClientBuilder.cs
index 9571df63..7f30909e 100644
--- a/Server/Core/Build/ClientBuilder.cs
+++ b/Server/Core/Build/ClientBuilder.cs
@@ -1,6 +1,5 @@
using System;
using System.IO;
-using System.Xml;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Vestris.ResourceLib;
@@ -34,13 +33,12 @@ namespace xServer.Core.Build
/// The path to the icon for the client.
/// Information about the client executable's assembly information.
/// The version number of the client.
- /// Determines whether to require administrator privileges on startup.
/// Thrown if the builder was unable to rename the client executable.
/// Thrown if an invalid special folder was specified.
/// Thrown if the client binaries do not exist.
public static void Build(string output, string tag, string host, string password, string installsub, string installname,
string mutex, string startupkey, bool install, bool startup, bool hidefile, bool keylogger,
- int reconnectdelay, int installpath, string iconpath, string[] asminfo, string version, bool requireAdmin)
+ int reconnectdelay, int installpath, string iconpath, string[] asminfo, string version)
{
// PHASE 1 - Settings
string encKey = FileHelper.GetRandomFilename(20);
@@ -169,23 +167,7 @@ namespace xServer.Core.Build
versionResource.SaveTo(output);
}
- // PHASE 5 - Manifest rewriting to require Administrator privileges on startup
- if (requireAdmin)
- {
- ManifestResource rc = new ManifestResource();
- rc.LoadFrom(output);
- var nodes = rc.Manifest.GetElementsByTagName("requestedExecutionLevel");
- if (nodes == null || nodes.Count == 0)
- throw new Exception("Reading Manifest failed");
- foreach (XmlNode node in nodes)
- {
- node.Attributes["level"].Value = "requireAdministrator";
- break;
- }
- rc.SaveTo(output);
- }
-
- // PHASE 6 - Icon changing
+ // PHASE 5 - Icon changing
if (!string.IsNullOrEmpty(iconpath))
IconInjector.InjectIcon(output, iconpath);
}
diff --git a/Server/Core/Data/BuilderProfile.cs b/Server/Core/Data/BuilderProfile.cs
index 38b64d2d..48ff548c 100644
--- a/Server/Core/Data/BuilderProfile.cs
+++ b/Server/Core/Data/BuilderProfile.cs
@@ -287,18 +287,6 @@ namespace xServer.Core.Data
}
}
- public bool RequireAdministrator
- {
- get
- {
- return bool.Parse(ReadValueSafe("RequireAdministrator", "False"));
- }
- set
- {
- WriteValue("RequireAdministrator", value.ToString());
- }
- }
-
public BuilderProfile(string profileName)
{
if (string.IsNullOrEmpty(profileName)) throw new ArgumentException("Invalid Profile Path");
diff --git a/Server/Forms/FrmBuilder.Designer.cs b/Server/Forms/FrmBuilder.Designer.cs
index bf71c2d2..ebdbce5c 100644
--- a/Server/Forms/FrmBuilder.Designer.cs
+++ b/Server/Forms/FrmBuilder.Designer.cs
@@ -113,7 +113,6 @@
this.lblTrademarks = new System.Windows.Forms.Label();
this.txtCopyright = new System.Windows.Forms.TextBox();
this.additionalTab = new System.Windows.Forms.TabPage();
- this.chkRequireAdministrator = new System.Windows.Forms.CheckBox();
this.line10 = new xServer.Controls.Line();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
@@ -970,7 +969,6 @@
// additionalTab
//
this.additionalTab.BackColor = System.Drawing.SystemColors.Control;
- this.additionalTab.Controls.Add(this.chkRequireAdministrator);
this.additionalTab.Controls.Add(this.line10);
this.additionalTab.Controls.Add(this.label14);
this.additionalTab.Controls.Add(this.label13);
@@ -984,17 +982,6 @@
this.additionalTab.TabIndex = 3;
this.additionalTab.Text = "Additional Settings";
//
- // chkRequireAdministrator
- //
- this.chkRequireAdministrator.AutoSize = true;
- this.chkRequireAdministrator.Location = new System.Drawing.Point(23, 119);
- this.chkRequireAdministrator.Name = "chkRequireAdministrator";
- this.chkRequireAdministrator.Size = new System.Drawing.Size(226, 17);
- this.chkRequireAdministrator.TabIndex = 5;
- this.chkRequireAdministrator.Text = "Require Administrator privileges to run";
- this.chkRequireAdministrator.UseVisualStyleBackColor = true;
- this.chkRequireAdministrator.CheckedChanged += new System.EventHandler(this.HasChangedSetting);
- //
// line10
//
this.line10.LineAlignment = xServer.Controls.Line.Alignment.Horizontal;
@@ -1178,6 +1165,5 @@
private Controls.Line line10;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.ToolStripMenuItem ctxtClear;
- private System.Windows.Forms.CheckBox chkRequireAdministrator;
}
}
diff --git a/Server/Forms/FrmBuilder.cs b/Server/Forms/FrmBuilder.cs
index f015091e..7519df8c 100644
--- a/Server/Forms/FrmBuilder.cs
+++ b/Server/Forms/FrmBuilder.cs
@@ -51,7 +51,6 @@ namespace xServer.Forms
txtOriginalFilename.Text = profile.OriginalFilename;
txtProductVersion.Text = profile.ProductVersion;
txtFileVersion.Text = profile.FileVersion;
- chkRequireAdministrator.Checked = profile.RequireAdministrator;
_profileLoaded = true;
}
@@ -83,7 +82,6 @@ namespace xServer.Forms
profile.OriginalFilename = txtOriginalFilename.Text;
profile.ProductVersion = txtProductVersion.Text;
profile.FileVersion = txtFileVersion.Text;
- profile.RequireAdministrator = chkRequireAdministrator.Checked;
}
private void FrmBuilder_Load(object sender, EventArgs e)
@@ -283,7 +281,7 @@ namespace xServer.Forms
ClientBuilder.Build(output, txtTag.Text, HostHelper.GetRawHosts(_hosts), txtPassword.Text, txtInstallsub.Text,
txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, chkStartup.Checked,
chkHide.Checked, chkKeylogger.Checked, int.Parse(txtDelay.Text), GetInstallPath(), icon, asmInfo,
- Application.ProductVersion, chkRequireAdministrator.Checked);
+ Application.ProductVersion);
MessageBox.Show("Successfully built client!", "Build Success", MessageBoxButtons.OK,
MessageBoxIcon.Information);