Jump to content

  •  

  • iBotModz CBox


    Photo

    Executing a CMD command in VB.net


    • Please log in to reply
    8 replies to this topic

    #1 ixGAMEOVERxixx

    ixGAMEOVERxixx

      Private Grade 2

    • VIP

    • 478 posts
    • Joined: 27-October 08
    • Gender:Not Telling
    • Location:Custom Games

    Posted 24 June 2009 - 12:45 PM

    Shell("cmd.exe /k COMMAND")

    Hope this helps..

    Thanks to Slip for always fixing my errors ;)

    Edited by ixGAMEOVERxixx, 24 June 2009 - 03:47 PM.


    #2 lostmodz26

    lostmodz26

      I am lostmodz26.

    • VIP

    • 1,153 posts
    • Joined: 12-March 09
    • Gender:Male
    • Location:Northern Louisiana

    Posted 24 June 2009 - 01:53 PM

    I thought that shell is supposed to open a file. Nice post, could help some people.

    #3 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

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

    Posted 24 June 2009 - 02:44 PM

    That executes commands as if it was a "Run..." dialog box, not a CMD..

    to run CMD commands:

    Shell("cmd.exe /k COMMAND")
    


    #4 iKhaosmaster

    iKhaosmaster

      Yawn

    • Members+

    • 1,346 posts
    • Joined: 29-April 08
    • Gender:Male

    Posted 24 June 2009 - 08:15 PM

    Wow I should get credit. I told you how to do this in the shoutbox today.

    #5 ixGAMEOVERxixx

    ixGAMEOVERxixx

      Private Grade 2

    • VIP

    • 478 posts
    • Joined: 27-October 08
    • Gender:Not Telling
    • Location:Custom Games

    Posted 25 June 2009 - 12:57 PM

    lol, I searched chat to see who first told me and couldn't find you.. and then Slip posted and made it work better

    #6 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

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

    Posted 25 June 2009 - 09:18 PM

    Your welcome!

    #7 miinaturvat

    miinaturvat

      miiinaturvat

    • Donors+

    • 927 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Dragon Shores!

    Posted 26 June 2009 - 02:10 PM

    You do know that when you type a command into CMD, all it does is run that program with the specified arguments?

    I.e if you type "ipconfig /all", all CMD does is run "ipconfig.exe" and pass it the argument "/all".

    CMD is nothing special; it just executes things. :)

    #8 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

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

    Posted 26 June 2009 - 08:33 PM

    CMD executes things that can't be ran in normal windows. Parameter programs.

    #9 lostmodz26

    lostmodz26

      I am lostmodz26.

    • VIP

    • 1,153 posts
    • Joined: 12-March 09
    • Gender:Male
    • Location:Northern Louisiana

    Posted 26 June 2009 - 09:12 PM

    Yeah, it basically does the thing when you make a shortcut, and you put commands in the target.