title: How to run process as 32 bit (Application doesn't work for 32bit OS)
body: <p>First - I am newbie on this website so I am carefull on begginning.</p>
  
  <p>I have a problem with my process. I want to start it as 32 - 64 bit process no only 64 bit. I try changing debug configurations in my Visual Studia 2010 on AnyCPU, x64, x86 but it doesn't work.</p>
  
  <p>My Code is here:</p>
  
  <pre><code>public static void startMinecraft(bool mode, string ramMax, string ramMin, string username, string sessionID, bool debug, string javafold, string mainfolder, string server)
          {
              string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\";
              string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\";
  
              Process proc = new Process();
              proc.StartInfo.UseShellExecute = false;
              if (Environment.Is64BitProcess)
              {
                  MessageBox.Show("yes"); // it is always yes
              }
              else 
              {
                  MessageBox.Show("no");
              }
  
              if (proc.StartInfo.EnvironmentVariables.ContainsKey("APPDATA"))
                  proc.StartInfo.EnvironmentVariables["APPDATA"] = @appData + mainfolder + "\\" + server;
              else
                  proc.StartInfo.EnvironmentVariables.Add("APPDATA", @appData + mainfolder + "\\" + server);
  
              if (debug == true)
              {
                  proc.StartInfo.FileName = @appData + javafold + "\\jre\\bin\\java.exe";
              }
              else
              {
                  proc.StartInfo.FileName = @appData + javafold + "\\jre\\bin\\javaw.exe";
              }
  
              //Online and offline modes
              if (mode == true)
              {
                  proc.StartInfo.Arguments = "-cp \"" + appData + mainfolder + "/.minecraft/bin/minecraft.jar;" + appData + mainfolder + "/.minecraft/bin/lwjgl.jar;" + appData + mainfolder + "/.minecraft/bin/lwjgl_util.jar;" + appData + mainfolder + "/.minecraft/bin/jinput.jar;\" ";
                  proc.StartInfo.Arguments += "\"-Djava.library.path=" + appData + mainfolder + "/.minecraft/bin/natives\" -Xmx" + ramMax + "M -Xms" + ramMin + "M net.minecraft.client.Minecraft " + username + " " + sessionID;
              }
              else
              {
                  proc.StartInfo.Arguments = "-cp \"" + appData + mainfolder + "\\" + server + "\\.minecraft\\bin\\minecraft.jar;" + appData + mainfolder + "\\" + server + "\\.minecraft\\bin\\lwjgl.jar;" + appData + mainfolder + "\\" + server + "\\.minecraft\\bin\\lwjgl_util.jar;" + appData + mainfolder + "\\" + server + "\\.minecraft\\bin\\jinput.jar;\" ";
                  proc.StartInfo.Arguments += "\"-Djava.library.path=" + appData + mainfolder + "\\" + server + "\\.minecraft\\bin\\natives\" -Xmx" + ramMax + "M -Xms" + ramMin + "M -XX:MaxPermSize=256m net.minecraft.client.Minecraft " + username;
              }
              proc.Start();
          }
  </code></pre>
  
  <p>This process works perfectly but only on 64 bit OS platforms.</p>
  
  <p>Error on 32 bit OS is:</p>
  
  <pre><code>System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
     at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
     at System.Diagnostics.Process.Start()
     at WindowsFormsApplication1.Form1.startMinecraft(Boolean mode, String ramMax, String ramMin, String username, String sessionID, Boolean debug, String javafold, String mainfolder, String server)
     at WindowsFormsApplication1.Form1.button1_Click(Object sender, EventArgs e)
     at System.Windows.Forms.Control.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) etc...
  </code></pre>
  
  <p>Thanks for all help! And sorry for my mistakes in english.</p>