bat command into visual c#

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! mihael1996 is offline
    MemberRank
    Apr 2010 Join Date
    396Posts

    bat command into visual c#

    how i am can put this command
    start localhost.exe 127.0.0.1 8484
    into visual basic


  2. #2
    BloopBloop Hilia is offline
    MemberRank
    Aug 2012 Join Date
    905Posts

    Re: bat command into visual c#

    If you want to launch this just put this code in a bat file:

    This only works for kms if i am correct 0_0?
    Code:
    @echo off
    start ...\localhost.exe 127.0.0.1 8484
    Then put the bat in the correct path and launch it.

  3. #3
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: bat command into visual c#

    Quote Originally Posted by Hilia View Post
    If you want to launch this just put this code in a bat file:

    This only works for kms if i am correct 0_0?
    Code:
    @echo off
    start ...\localhost.exe 127.0.0.1 8484
    Then put the bat in the correct path and launch it.
    Work's fine if you're using a localhost for like GMS v83,111 etc.

    For KMS, it works on their main client, yeah :P That's how I connect anyway

  4. #4
    Account Upgraded | Title Enabled! mihael1996 is offline
    MemberRank
    Apr 2010 Join Date
    396Posts

    Re: bat command into visual c#

    i am dont want use this bat command i am want pu this bat into this

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace WindowsFormsApplication1
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {

    }
    }
    }

  5. #5
    BloopBloop Hilia is offline
    MemberRank
    Aug 2012 Join Date
    905Posts

    Re: bat command into visual c#

    I posted a example of how to launch a program in C# in your last thread...

    http://forum.ragezone.com/f566/launcher-903565/

    Google this code and try if you can do it your self
    Code:
     Process.Start()

  6. #6
    (Y012345) ~Luca~ is offline
    MemberRank
    Jul 2010 Join Date
    C:\DownloadsLocation
    488Posts

    Re: bat command into visual c#

    I need to know how to do this but for C#. I can't run the .bat file because I want I need the parameters of it to change every time. So how can you run bat commands, but with code?

  7. #7
    Alpha Member TiredGuy is offline
    MemberRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: bat command into visual c#

    this should work
    System.Diagnostics.Process.Start("file location")
    That's what I use for my vb launcher.
    Your a noob o.o why you remove the handle? Talking about the example u gave. You removed button handle.

  8. #8
    (Y012345) ~Luca~ is offline
    MemberRank
    Jul 2010 Join Date
    C:\DownloadsLocation
    488Posts

    Re: bat command into visual c#

    Solved it, nevermind.

  9. #9
    Infraction Banned rice is offline
    MemberRank
    Nov 2009 Join Date
    2,905Posts

    Re: bat command into visual c#

    by the way, visual C# isn't a language (and it's not an IDE either)

  10. #10
    Account Upgraded | Title Enabled! mihael1996 is offline
    MemberRank
    Apr 2010 Join Date
    396Posts

    Re: bat command into visual c#

    Quote Originally Posted by TiredGuy View Post
    this should work
    System.Diagnostics.Process.Start("file location")
    That's what I use for my vb launcher.
    Your a noob o.o why you remove the handle? Talking about the example u gave. You removed button handle.
    i am not need this becaus i am need pu the bat command into my c# becaus i am dont want that another pepols will start the game without start the client

  11. #11
    BloopBloop Hilia is offline
    MemberRank
    Aug 2012 Join Date
    905Posts

    Re: bat command into visual c#

    Quote Originally Posted by mihael1996 View Post
    I not need this becaus i am need pu the bat command into my c# becaus i am dont want that another pepols will start the game without start the client
    YOU NEED IT:
    Code:
     "Process.Start()"
    Maybe it helps if you google all overloads for this 2 WORDS of code

    Or try this?
    Maybe it can explain you how "Process.Start()" WORKS -_-

    C# Process.Start Examples
    Process.Start Method
    When you understand how it works then you need one of those
    THIS
    or
    THIS

    OR LET ME GOOGLE IT FOR YOU:
    HERE
    Last edited by Hilia; 13-01-13 at 02:48 PM.

  12. #12
    (Y012345) ~Luca~ is offline
    MemberRank
    Jul 2010 Join Date
    C:\DownloadsLocation
    488Posts

    Re: bat command into visual c#

    How I did it:
    Code:
                                StreamWriter sw = new StreamWriter("run.bat");
                                sw.WriteLine("@echo off");
                                sw.WriteLine("echo Put lines here");
                                sw.Close();
    
    	       Process.Start("run.bat")
    That's to make the bat in the code, not to just run a bat outside of it.



Advertisement