title: How to quit application using command line arguments inside a Task
body: <p>I am using electron 5.0.0 and I am trying to use windows JumpList and the Task category to quit my electron application. </p>
  
  <pre><code>    {
          program: process.execPath,
          arguments: '--new-window',
          iconPath: process.execPath,
          iconIndex: 0,
          title: 'New Window',
          description: 'Create a new window'
      }
  ])
  </code></pre>
  
  <p>I am trying to modify the example code from the electron website and i need to change the arguments</p>
  
  <p>"arguments String - The command line arguments when program is executed."</p>
  
  <p>I know windows has built in arguments like --new-window</p>
  
  <p>So my question is does windows have something that will quit the application or do i need to make a custom argument if so how would i go about doing that</p>
  
  <p>I want it to have the same functionality of skype see image
  <a href="https://i.stack.imgur.com/a4mwI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a4mwI.png" alt="enter image description here"></a></p>
  
  <p>EDIT:</p>
  
  <p>I tried using second-instance event but it does not seem to be called when the user clicks on the task</p>
  
  <pre><code>app.setUserTasks([
      {
          program: process.execPath,
          arguments: '--force-quit',
          iconPath: process.execPath,
          iconIndex: 0,
          title: 'Force Quit App',
          description: 'This will close the app instead of minimizing it.'
      }
  ])
  app.on('second-instance', (e, argv)=&gt;{
      console.log("secinst" + argv)
      if(argv === '--force-quit'){
          win.destroy();
      }
  
  })
  </code></pre>