public void PostExecute_Arguments_PassThrough() { return; _dummies.MoveToSource("fn"); _action = new DeployAction(ConstantsPR.TestSourcePath, ConstantsPR.TestTargetPath, null, new List <string>() { "f.exe", "a1", "a2", "a3" }, false); _action.Act(); /* we expect to see f.exe window with arguments a1, a2 and a3 */ _action.ExecuteAfter(); }
private static void Main_Inner(string[] args) { // getting target path string targetPath = System.Reflection.Assembly.GetExecutingAssembly().Location; targetPath = Path.GetDirectoryName(targetPath); // reading configuration and arguments List <string> argsList = args.ToList(); string sourcePath = Properties.Settings.Default.DeploymentDirectory; string manifestFile = Properties.Settings.Default.ManifestFile; string startExe = Properties.Settings.Default.StartupApplicationExe; bool allowOfline = Properties.Settings.Default.AllowOffline; if (string.IsNullOrWhiteSpace(startExe) == false) { argsList.Insert(0, startExe); } // ACTION: performing upgrade action DeployAction action = new DeployAction(sourcePath, targetPath, manifestFile, argsList, allowOfline); int ix = action.Act(); if (ix > 0) { if (Properties.Settings.Default.ShowUpgradePopup) { Application.Run(new UpdatePopup()); } } // ACTION: check for stop file string message = action.CheckStopFile(); if (message != null) { if (message == "") { message = "Access to the application '" + ConstantsPR.ApplicationName + "' is temporarily suspended."; } MessageBox.Show(message, ConstantsPR.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } // ACTION: running post-upgrade commands action.ExecuteAfter(); }