bitsadmin setnotifycmdline

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

BITS 1.2 and earlier: Not supported.


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


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.


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


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


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

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

Additional references

Command-Line Syntax Key