CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    32

    system32\cmd.exe taking too long to load file

    I am using the system(START Outputfile);
    command in my program to display the outputfile to the screen and it is taking about 1 minute to be displayed. I would like to know what could be causing the problem.

    I am letting the user input the filename, I open the file, write to the file and close file and then I use the system command to display the file. I don't know if it is related to how big the file is. I know the file is created with the results, because I see it my directory.

    Also could it be I am killing a process before I call the system call. Please I need some ideas.

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: system32\cmd.exe taking too long to load file

    What is the contents of outputfile?
    Why don't you use ShellExecute or ShellExecuteEx to display the file? That is the windows way of doing that.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured