Thread: How can command "Window" through exe extension??

  1. #1
    Registered User
    Join Date
    Aug 2007
    Location
    Thailand..Interested??^^
    Posts
    2

    Talking How can command "Window" through exe extension??

    I want to use .ExE extension to run command line using DOS command,,,,
    but I don't know what function can I use.
    Can you show me the way....thank you...sure ^^

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm sorry, but I have to say that I don't understand what you want to do - and I have sympathy with you, as I'm sure that English is a foreign language to you, but can you please try to explain in some other way what you want to do?

    --
    Mats

  3. #3
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    I think he wants to run a DOS command in his program. You can do that using system.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  4. #4
    Registered User
    Join Date
    Aug 2007
    Location
    Thailand..Interested??^^
    Posts
    2
    Thank you for your help ^^
    .........
    Its near my purpose.........but the question is "How can I put window command line in my program"
    .............
    for example, I can use
    CHKDSK -
    to scan disk in batch file easily....
    but, my goal is how can I use the command line in exe extension file instead of batch file
    .............
    The result is, I can click on my exe file directly without batch file anymore to scan disk.
    .............Thank You...

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    It's command.com, not command.exe, although there is another shell shipped with XP called cmd.exe that is more Windowsy and less DOSy.

    maybe you want this:
    Code:
    system("command.com /C \"CHKDSK -\"");

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to monitor exe and dll interactions?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 10-26-2007, 04:22 AM
  2. how to run an exe command in c++ and get back the results?
    By mitilkhatoon in forum C++ Programming
    Replies: 5
    Last Post: 09-21-2006, 06:00 PM
  3. Close another exe from another exe??
    By Tony in forum Windows Programming
    Replies: 1
    Last Post: 06-12-2002, 07:19 AM
  4. insert another exe into exe
    By lliero in forum C Programming
    Replies: 8
    Last Post: 04-12-2002, 12:22 PM
  5. get file extension
    By Nada in forum C Programming
    Replies: 3
    Last Post: 12-22-2001, 09:12 AM