Thread: C++ Shell?

Results 1 to 10 of 10
  1. #1
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused

    C++ Shell?

    Hey all id like to start off by introducing myself, Im bombsaway707 i code Visual Basics fairly well and id like to start learning C++. Ok now i was just wondering how to shell things in C++. For example in VB shelling a tapper would be:
    Code:
    Shell("ipconfig/ release")
    Is there a way to shell commands like this in C++?
    + rep for answer

  2. #2
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    its called System("command in here");

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  3. #3
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by why06 View Post
    its called System("command in here");
    ok thank you, ill go test and +rep if it works

  4. #4
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    System(" * ");

    The command goes where the asterisks is

  5. #5
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by zeco View Post
    System(" * ");

    The command goes where the asterisks is
    sorry why06 beat u

  6. #6
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    An alternative from using System().

    [php]
    ShellExecute( NULL, "open", "C:\\WINDOWS\\system32\\cmd.exe","/C ipconfig/release",NULL, SW_SHOWNORMAL);
    [/php]

  7. The Following User Says Thank You to Void For This Useful Post:

    Zoom (01-23-2010)

  8. #7
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    And david beat me to the alternative
    Ah we-a blaze the fyah, make it bun dem!

  9. #8
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    yep he did

    but i just wonderd is the c++ section like a competision off some sort?

  10. #9
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by iopop9 View Post
    yep he did

    but i just wonderd is the c++ section like a competision off some sort?
    It is not in anyway a competision

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  11. #10
    ctpsolo's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    252
    Reputation
    10
    Thanks
    37
    My Mood
    Amused
    Another alternative is to use CreateProcess().
    But I suppose it's easier to go with system/shellexecute if you are a beginner.

Similar Threads

  1. Knightonline -Tbl edit - 27/08/2007 - shells for all
    By AN1MAL in forum Knight Online Hacks
    Replies: 5
    Last Post: 12-15-2009, 01:36 PM
  2. Shell Shockers
    By GOD in forum General
    Replies: 3
    Last Post: 08-24-2009, 02:20 AM
  3. Hard Shell Invader
    By Zhellbound in forum General
    Replies: 20
    Last Post: 02-06-2009, 01:48 PM
  4. [Skin]Winchester Wooden Pumper+ Green Shells
    By castaway in forum WarRock - International Hacks
    Replies: 14
    Last Post: 10-25-2008, 05:18 PM
  5. [Help]With Shell Command..
    By dor619 in forum Visual Basic Programming
    Replies: 6
    Last Post: 10-05-2007, 06:14 AM