Bitsadmin /setnotifycmdline


Applies To: Windows Server 2008 R2,Windows Server 2008,Windows Vista

Sets the command-line command that will run when the job finishes transferring data or when a job enters a state..

Syntax


Copy Code

bitsadmin /SetNotifyCmdLine <Job> <ProgramName> [ProgramParameters]

Parameters

Parameter

Description

Job

The job's display name or GUID

ProgramName

Name of the command to run when the job completes.

ProgramParameters

Parameters that you want to pass to ProgramName.

Remarks

You can specify NULL for ProgramName and ProgramParameters. If ProgramName is NULL, ProgramParameters must be NULL.

Important

If ProgramParameters is not NULL, then the first parameter in ProgramParameters must match ProgramName.

Examples

The following example sets the command-line command used by the service to run notepad when the job named myDownloadJob completes.


Copy Code

C:\>bitsadmin /SetNotifyCmdLine myDownloadJob c:\winnt\system32\notepad.exe NULL


Copy Code

C:\>bitsadmin /SetNotifyCmdLine myDownloadJob c:\winnt\system32\notepad.exe "notepad c:\eula.txt"

Additional references

Command-Line Syntax Key