Process launcher, windows version
authorGustavo Martin <gu.martinm@gmail.com>
Mon, 9 Jun 2014 04:56:40 +0000 (06:56 +0200)
committerGustavo Martin <gu.martinm@gmail.com>
Mon, 9 Jun 2014 04:56:40 +0000 (06:56 +0200)
Allgemeines/ProcessLauncher/ProcessLauncher.MonoDevelop.sln [new file with mode: 0644]
Allgemeines/ProcessLauncher/ProcessLauncher.Windows8.sln [new file with mode: 0644]
Allgemeines/ProcessLauncher/ProcessLauncher.sln [deleted file]
Allgemeines/ProcessLauncher/ProcessLauncher/App.config [new file with mode: 0644]
Allgemeines/ProcessLauncher/ProcessLauncher/LinuxWindowsProcess.cs
Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.MonoDevelop.csproj [new file with mode: 0644]
Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.Windows8.csproj [new file with mode: 0644]
Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.csproj [deleted file]
Allgemeines/ProcessLauncher/ProcessLauncher/Program.cs

diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher.MonoDevelop.sln b/Allgemeines/ProcessLauncher/ProcessLauncher.MonoDevelop.sln
new file mode 100644 (file)
index 0000000..fc85f8f
--- /dev/null
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessLauncher", "ProcessLauncher\ProcessLauncher.MonoDevelop.csproj", "{8C9CE3D4-590C-49DA-A165-9B82625E4A3E}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|x86 = Debug|x86
+               Release|x86 = Release|x86
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Debug|x86.ActiveCfg = Debug|x86
+               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Debug|x86.Build.0 = Debug|x86
+               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Release|x86.ActiveCfg = Release|x86
+               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Release|x86.Build.0 = Release|x86
+       EndGlobalSection
+       GlobalSection(MonoDevelopProperties) = preSolution
+               StartupItem = ProcessLauncher\ProcessLauncher.csproj
+       EndGlobalSection
+EndGlobal
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher.Windows8.sln b/Allgemeines/ProcessLauncher/ProcessLauncher.Windows8.sln
new file mode 100644 (file)
index 0000000..da714a7
--- /dev/null
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30110.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessLauncher", "ProcessLauncher\ProcessLauncher.Windows8.csproj", "{76B318BA-6C22-4E85-8146-A7F8AFD17398}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {76B318BA-6C22-4E85-8146-A7F8AFD17398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {76B318BA-6C22-4E85-8146-A7F8AFD17398}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {76B318BA-6C22-4E85-8146-A7F8AFD17398}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {76B318BA-6C22-4E85-8146-A7F8AFD17398}.Release|Any CPU.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher.sln b/Allgemeines/ProcessLauncher/ProcessLauncher.sln
deleted file mode 100644 (file)
index d6dc8a6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessLauncher", "ProcessLauncher\ProcessLauncher.csproj", "{8C9CE3D4-590C-49DA-A165-9B82625E4A3E}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|x86 = Debug|x86
-               Release|x86 = Release|x86
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Debug|x86.ActiveCfg = Debug|x86
-               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Debug|x86.Build.0 = Debug|x86
-               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Release|x86.ActiveCfg = Release|x86
-               {8C9CE3D4-590C-49DA-A165-9B82625E4A3E}.Release|x86.Build.0 = Release|x86
-       EndGlobalSection
-       GlobalSection(MonoDevelopProperties) = preSolution
-               StartupItem = ProcessLauncher\ProcessLauncher.csproj
-       EndGlobalSection
-EndGlobal
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher/App.config b/Allgemeines/ProcessLauncher/ProcessLauncher/App.config
new file mode 100644 (file)
index 0000000..9c05822
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
+    </startup>
+</configuration>
\ No newline at end of file
index 947443f..3f83771 100644 (file)
@@ -40,7 +40,8 @@ namespace ProcessLauncher
 
 
             // Define variables shared by class methods. 
-            StringBuilder processOutput = null;
+            StringBuilder processOutput = new StringBuilder();
+
             Process process = new Process();
 
             process.StartInfo = startInfo;
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.MonoDevelop.csproj b/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.MonoDevelop.csproj
new file mode 100644 (file)
index 0000000..bf80cb6
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>12.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{8C9CE3D4-590C-49DA-A165-9B82625E4A3E}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>ProcessLauncher</RootNamespace>
+    <AssemblyName>ProcessLauncher</AssemblyName>
+    <Description>Launching processes from C#</Description>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Externalconsole>true</Externalconsole>
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Externalconsole>true</Externalconsole>
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="LinuxWindowsProcess.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Folder Include="shellscripts\" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.Windows8.csproj b/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.Windows8.csproj
new file mode 100644 (file)
index 0000000..c919a86
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{76B318BA-6C22-4E85-8146-A7F8AFD17398}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>ProcessLauncher.Windows8</RootNamespace>
+    <AssemblyName>ProcessLauncher.Windows8</AssemblyName>
+    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <PublishUrl>publicar\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="LinuxWindowsProcess.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.5.1 %28x86 y x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
diff --git a/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.csproj b/Allgemeines/ProcessLauncher/ProcessLauncher/ProcessLauncher.csproj
deleted file mode 100644 (file)
index bf80cb6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
-    <ProductVersion>12.0.0</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{8C9CE3D4-590C-49DA-A165-9B82625E4A3E}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>ProcessLauncher</RootNamespace>
-    <AssemblyName>ProcessLauncher</AssemblyName>
-    <Description>Launching processes from C#</Description>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Externalconsole>true</Externalconsole>
-    <PlatformTarget>x86</PlatformTarget>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <DebugType>full</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Externalconsole>true</Externalconsole>
-    <PlatformTarget>x86</PlatformTarget>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="LinuxWindowsProcess.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ItemGroup>
-    <Folder Include="shellscripts\" />
-  </ItemGroup>
-</Project>
\ No newline at end of file
index 2d96dea..b9e6bea 100644 (file)
@@ -8,12 +8,14 @@ namespace ProcessLauncher
         {
             LinuxWindowsProcess process = new LinuxWindowsProcess();
             Console.WriteLine("Linux");
-            var output = process.Test("ls", "-lah");
-            Console.WriteLine("stdout: {0}", output.ToString());
+            var linuxOutput = process.Test("ls", "-lah");
+            Console.WriteLine("stdout: {0}", linuxOutput.ToString());
 
-            // Console.WriteLine("Windows");
-            // output = process.Test("dir", "/a");
-            // Console.WriteLine("stdout: {0}", output.ToString());
+            Console.WriteLine("Windows");
+            var windowsOutput = process.Test("cmd.exe", "/C dir /A");
+            Console.WriteLine("stdout: {0}", windowsOutput.ToString());
+
+            Console.ReadLine();
         }
     }
 }