diff options
| author | william341 <[email protected]> | 2016-07-23 10:19:56 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-07-23 10:19:56 -0700 |
| commit | 08342014cb241f7d4f5f8953a9fb67d7123f9593 (patch) | |
| tree | 1de3fe485b8bcc080b8ed8e1ebb90f756fc60c21 /source/WindowsFormsApplication1/Apps | |
| parent | c2acf569185ddd628b591e1b149da74dd301e93d (diff) | |
| parent | 60ca1cf76437bb35d4923b2d4e6f7d06d3189033 (diff) | |
| download | shiftos-c--08342014cb241f7d4f5f8953a9fb67d7123f9593.tar.gz shiftos-c--08342014cb241f7d4f5f8953a9fb67d7123f9593.tar.bz2 shiftos-c--08342014cb241f7d4f5f8953a9fb67d7123f9593.zip | |
Merge pull request #15 from ComputeLinux/master
Commiting something
Diffstat (limited to 'source/WindowsFormsApplication1/Apps')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Terminal.cs | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs index 3d0e2b8..cc69043 100644 --- a/source/WindowsFormsApplication1/Apps/Terminal.cs +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -1662,33 +1662,40 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o /// <param name="args">string[] args</param> public void runExe(string[] args) { - bool isFirstArg = true; - string exeArgs = ""; - foreach (string arg in args) + if (API.Upgrades[""]) { - if (!isFirstArg) + bool isFirstArg = true; + string exeArgs = ""; + foreach (string arg in args) { - exeArgs = exeArgs + " " + arg; + if (!isFirstArg) + { + exeArgs = exeArgs + " " + arg; + } + else + { + isFirstArg = false; + } } - else - { - isFirstArg = false; - } - } - string lp = "C:\\ShiftOS\\bin\\" + args[0] + ".exe"; - Process p = new Process(); - p.StartInfo.Arguments = exeArgs; - p.StartInfo.UseShellExecute = false; - p.StartInfo.RedirectStandardOutput = true; - p.StartInfo.RedirectStandardInput = true; - p.StartInfo.FileName = lp; - p.StartInfo.CreateNoWindow = true; - p.StartInfo.ErrorDialog = false; - p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; - p.StartInfo.WorkingDirectory = current_dir; - p.Start(); - WriteLine(p.StandardOutput.ReadToEnd()); - p.WaitForExit(); + string lp = "C:\\ShiftOS\\bin\\" + args[0] + ".exe"; + Process p = new Process(); + p.StartInfo.Arguments = exeArgs; + p.StartInfo.UseShellExecute = false; + p.StartInfo.RedirectStandardOutput = true; + p.StartInfo.RedirectStandardInput = true; + p.StartInfo.FileName = lp; + p.StartInfo.CreateNoWindow = true; + p.StartInfo.ErrorDialog = false; + p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + p.StartInfo.WorkingDirectory = current_dir; + p.Start(); + WriteLine(p.StandardOutput.ReadToEnd()); + p.WaitForExit(); + } + else + { + wrongcommand(); + } } #endregion |
