Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hello
I see this page : http://www.internetdownloadmanager.com/support/command_line.html
But i can't find and parameter for stop download
i Want to know how can i stop download with command line parameters ? possible ?
 
and white this parameter "/s" i can start download in "main download queue" !
 
using from command line parameters for start "main download queue"!!!
System.Diagnostics.Process.Start(@...\IDMan.exe", "/s");
 
Now Can i start/stop a special queue , if i want ? How ?
 
Thanks
kind regards,
Posted 30-Dec-12 5:35am
Edited 30-Dec-12 5:36am
v2
Comments
Sergey Alexandrovich Kryukov at 30-Dec-12 13:56pm
   
Do you mind killing this process to stop? Is it Internet Download Manager? —SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. If you don't mind killing this process: the method Process.Start will return an instance of System.Diagnostics.Process:
System.Diagnostics.Process process = System.Diagnostics.Process.Start(/* ... */);
 
//...

//later on:
process.Kill();
 
If what you start is really an Internet Download Manager, it will certainly stop downloading Smile | :) .
However, this is not nice; and you won't know which of the files was only partially downloaded as you broke it in the middle.
 
Generally, using Process.Start is not a developer's approach. A real software developers will use its own downloading code embedded in your application, which is actually much simpler because you can get a full access to the functionality and progress. In contrast to the situation with external processes: they are well isolated; you cannot do much for controlling them.
 
Please see my full source code for HttpDownloader, use it the way you like: how to download a file from internet[^].
 
This application has a special feature: an ability to continue incomplete download later, starting from the same place.
 
See also my past answers:
FTP: Download Files[^],
how to download a file from the server in Asp.net 2.0[^].
 
—SA
  Permalink  
Comments
__TR__ at 30-Dec-12 14:14pm
   
My 5!
Sergey Alexandrovich Kryukov at 30-Dec-12 19:41pm
   
Thank you, —SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 534
1 OriginalGriff 312
2 Damith Weerasinghe 300
3 thatraja 220
4 ravikhoda 210
0 Sergey Alexandrovich Kryukov 10,974
1 OriginalGriff 6,667
2 Peter Leow 4,760
3 Abhinav S 3,813
4 Maciej Los 3,565


Advertise | Privacy | Mobile
Web04 | 2.8.140421.2 | Last Updated 30 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid