4

I want to add some links to the IDM. can anyone give me a pseudo code for doing that. or a link to a page that explains how to do it.

Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191
DanMatlin
  • 1,212
  • 7
  • 19
  • 37

4 Answers4

7

You may start IDM from the command line using the following parameters

idman /s

or idman /d URL [/p local_path] [/f local_file_name] [/q] [/h][/n] [/a]

Parameters:

/d URL - downloads a file

e.g. IDMan.exe /d "internetdownloadmanager.com/path/FileName.zip"

/s - starts queue in scheduler

/p local_path - defines the local path where to save the file

/f local_file_name - defines the local file name to save the file

/q - IDM will exit after the successful downloading. This parameter works only for the first copy

/h - IDM will hang up your connection after the successful downloading

/n - turns on the silent mode when IDM doesn't ask any questions

/a - add a file specified with /d to download queue, but don't start downloading

Parameters /a, /h, /n, /q, /f local_file_name, /p local_path work only if you specified the file to download with /d URL

Examples

C:>idman.exe /n /d tonec.com/download/idman317.exe

For More Information Visit :https://www.internetdownloadmanager.com/support/command_line.html

mp.hamid
  • 71
  • 2
  • 3
3

You can add links to IDM by passing the "-d" argument to IDMan.exe

From in your program or script, (you can use ShellExecute or the equivalent in whatever language you're using,) call [IDM Install Path]\IDMan.exe -d [link]

[IDM Install Path]: The directory where idm is installed
(eg. C:\Program Files\Internet Download Manager)

[link]: The url you want to add to IDM

Rick Lewis
  • 46
  • 3
  • This question is from two years ago, low quality and with not much activity since it was asked. Consider not answering such questions in the future. –  May 03 '14 at 13:43
3

I know this is an old question but I want to share my approach for those who has the same question

public void SendLinkToIdm(string url)
    {
        try
        {
            bool x_32 = System.IO.Directory.Exists(@"C:\Program Files\Internet Download Manager"); // check if system is 32bit
            bool x_64 = System.IO.Directory.Exists(@"C:\Program Files (x86)\Internet Download Manager"); // check if system is 64bit and you have installed 32bit programs on it 
            if (x_32 == true | x_64 == true) // if any of the above directories exist it means you have idm installed 
            {                    
                System.Diagnostics.Process p = new System.Diagnostics.Process(); // Start the child process.                    
                p.StartInfo.UseShellExecute = false; // Set the useshellExecute to false 
                p.StartInfo.RedirectStandardOutput = true; // Redirect the output stream of the child process.
                p.StartInfo.FileName = @"C:\Windows\System32\cmd.exe"; // specify the location of the command line 
                p.StartInfo.Verb = "runas";
                p.StartInfo.CreateNoWindow = true; // eliminate the process window
                if(x_32 == true)
                    p.StartInfo.Arguments = @"/C cd %programfiles%\Internet Download Manager && IDMan.exe /d " + "\"" + url + "\""; // first go to the idm location then execute the command 
                else
                    p.StartInfo.Arguments = @"/C cd C:\Program Files (x86)\Internet Download Manager && IDMan.exe /d " + "\"" + url + "\"";
                p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                p.Start(); // now when all is set run the process 
                p.WaitForExit(); // Waits here for the process to exit.
            }
            else
                MessageBox.Show("Please install Internet Download Manager " + System.Diagnostics.Process.Start("https://www.internetdownloadmanager.com/download.html")); // open the download page of the idm in the browser
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }

to call the function

 SendLinkToIdm("http://mirror2.internetdownloadmanager.com/idman630build10.exe");
Ahmed Soliman
  • 1,662
  • 1
  • 11
  • 16
-1

For doing so, The IDM shoulda support this kind of stuff, as i know it's not possible, but if you find any library or RPC way to send the data to IDM then yes!

Alireza Savand
  • 3,462
  • 3
  • 26
  • 36