Jump to content

  •  

  • iBotModz CBox


    Photo

    (VB.NET & C#) Executing A File


    • Please log in to reply
    8 replies to this topic

    #1 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 11 May 2009 - 10:14 PM

    Removed.

    Edited by Dark Slipstream, 16 August 2009 - 10:27 PM.

    • likes this

    #2 T3A guy

    T3A guy

      :)

    • Members+

    • 1,191 posts
    • Joined: 09-May 08
    • Gender:Male

    Posted 11 May 2009 - 10:16 PM

    Thanks, now I can make a fork bomb.
    :p

    #3 Lakar

    Lakar

      Private

    • Members+

    • 42 posts
    • Joined: 01-November 08

    Posted 11 May 2009 - 10:18 PM

    If you are trying to execute a .exe file. All you have to do is

    Process.Start("C:\\example\\Documents\\Visual Studio 2008\\Projects\\example\\example.exe");

    Note : This will not work without "using System.Diagnostics;", if you don't have this in your form, it will not recognize Process.

    -Lakar

    #4 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 11 May 2009 - 10:20 PM

    Thanks for specifying what was already used above xD.

    But seriously, good idea pointing out that System.Diagnostics is required, unless you add it to the top of your program.

    #5 Lakar

    Lakar

      Private

    • Members+

    • 42 posts
    • Joined: 01-November 08

    Posted 11 May 2009 - 10:36 PM

    Thanks for specifying what was already used above xD.

    But seriously, good idea pointing out that System.Diagnostics is required, unless you add it to the top of your program.


    They both do the same thing overall, just different ways of writing them.

    -Lakar

    #6 dschu012

    dschu012

      Private Grade 2

    • Members+

    • 83 posts
    • Joined: 19-March 08

    Posted 16 May 2009 - 08:42 AM

    You can also run the process with arguments if acceptable.

    Example:
    Process.Start("firefox.exe","-url www.ibotmodz.net");

    Edited by dschu012, 16 May 2009 - 08:43 AM.


    #7 yungbol

    yungbol

      Firmware Expert

    • Global Mods

    • 1,461 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Philly

    Posted 16 May 2009 - 09:21 AM

    Dark, your c# code isn't proper. c# is case-sensitive, you have "If" it should be "if". Also, brackets should be implemented.

    Edited by yungbol, 16 May 2009 - 09:22 AM.


    #8 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 16 May 2009 - 10:31 AM

    The {} aren't needed if you are only executing one line. Keep that in mind for future reference.

    I updated the "If" to "if". Thanks.

    #9 xX Epsilon Xx

    xX Epsilon Xx

      Sergeant Grade 2

    • Members+

    • 372 posts
    • Joined: 24-October 08
    • Gender:Male
    • Location:Halo!

    Posted 16 May 2009 - 07:53 PM

    Thank you, but Sorry if this does not incorporate with this.

    How can u make an AIO, all in one file, like 360-reality?