title: registering custom protocol at installation process in electron app
body: <p>Hi I am new to electron and was wondering how i can register a custom protocol for the app at the time of installation process of the app.</p>
  
  <p>I am using electron-builder for building the app. Here is the build build code</p>
  
  <pre><code>"build": {
  "appId": "com.test.testapp",
  "productName": "testapp",
  "asar": true,
  "protocols": [{
    "name": "testapp",
    "schemes": [ "testapp" ]
  }],
  "nsis": {
    "oneClick": false,
    "perMachine": true,
    "allowToChangeInstallationDirectory": true,
    "runAfterFinish": false,
    "createDesktopShortcut": true
  },
  "squirrelWindows": {
    "msi": true
  },
  "directories": {
    "output": "distribution"
  }
  </code></pre>
  
  <p>I know that by adding the below line registers the custom protocol</p>
  
  <pre><code> app.setAsDefaultProtocolClient("testapp");
  </code></pre>
  
  <p>but it only does if i run the app at least the first time.</p>
  
  <p>Which i don't want there is no guarantee that the user will launch the app after installation.</p>
  
  <p>So is there a way that i can register the custom protocol in the installation process using electron-builder</p>