aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Apps
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2016-07-23 04:04:50 -0700
committerGitHub <[email protected]>2016-07-23 04:04:50 -0700
commit03926af3d13399347ddb06e7c52e79e4195fff22 (patch)
treedf16cac64fdf491eaa424b97f5afbe5771b0769b /source/WindowsFormsApplication1/Apps
parent1e5d704db1436a28ab31c025027c9a4c8649e988 (diff)
parenta948ceb36cdf3600d810b0c03253d69f448f51eb (diff)
downloadshiftos-c--03926af3d13399347ddb06e7c52e79e4195fff22.tar.gz
shiftos-c--03926af3d13399347ddb06e7c52e79e4195fff22.tar.bz2
shiftos-c--03926af3d13399347ddb06e7c52e79e4195fff22.zip
Merge pull request #13 from carverh/master
Now with More GNU Commands
Diffstat (limited to 'source/WindowsFormsApplication1/Apps')
-rw-r--r--source/WindowsFormsApplication1/Apps/Terminal.cs77
1 files changed, 42 insertions, 35 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs
index 6d4880c..4fb6899 100644
--- a/source/WindowsFormsApplication1/Apps/Terminal.cs
+++ b/source/WindowsFormsApplication1/Apps/Terminal.cs
@@ -1615,43 +1615,11 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
}
if (done == false)
{
- // This runs LUA and EXE Applications
+ // This runs EXE Applications like Core Utils
// Created By Carver Harrison (@carverh)
- if (File.Exists("C:\\ShiftOS\\LuaApps\\" + args[0] + ".lua"))
+ if (File.Exists("C:\\ShiftOS\\bin\\" + args[0] + ".exe"))
{
- string lp = "C:\\ShiftOS\\LuaApps\\" + args[0] + ".lua";
- WriteLine(lp);
- var l = new LuaInterpreter(lp);
- }
- else if (File.Exists("C:\\ShiftOS\\bin\\" + args[0] + ".exe"))
- {
- bool isFirstArg = true;
- string exeArgs = "";
- foreach (string arg in args)
- {
- if (!isFirstArg)
- {
- exeArgs = exeArgs + " " + arg;
- }
- 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.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();
+ runExe(args);
}
else
{
@@ -1685,6 +1653,45 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
#endregion
+ #region RunEXE By Carver Harrison
+ /// <summary>
+ /// RunExe 1.1
+ /// This will run .exe files inside of /bin
+ /// Created By Carver Harrison (@carverh)
+ /// </summary>
+ /// <param name="args">string[] args</param>
+ public void runExe(string[] args)
+ {
+ bool isFirstArg = true;
+ string exeArgs = "";
+ foreach (string arg in args)
+ {
+ if (!isFirstArg)
+ {
+ exeArgs = exeArgs + " " + arg;
+ }
+ 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();
+ }
+ #endregion
+
private void StartChoice1EndStory()
{
var t = new System.Windows.Forms.Timer();