title: azure arm template installing 2 custom apps during deployment... but only 1 app is installing
body: <p>im trying to install 2 custom apps via the same arm template during a deployment.
  the arm template will do a domain join.
  then after a restart goes to install the Apps.</p>
  <p>Notepad++ and Sophos.</p>
  <p>problem im having is that only 1 of the apps will install, it does not continue onto the next app.
  im thinking that maybe the restart during the notepad++ part isnt needed.</p>
  <p>ive read the following post <a href="https://stackoverflow.com/questions/52807280/run-multiple-custom-scripts-through-azure-templates-on-same-vm">Run multiple custom scripts through Azure templates on same VM</a>
  and it mentions that a dependsOn is needed, but i dont see how sophos would be dependant on notepad++ installing so im not entirely sure as to whats going on..</p>
  <p>as far as i can tell the template.json code is correct.</p>
  <p>can anybody see anything thats incorrect?</p>
  <pre><code>{
              &quot;type&quot;: &quot;Microsoft.Compute/virtualMachines/extensions&quot;,
              &quot;apiVersion&quot;: &quot;2016-04-30-preview&quot;,
              &quot;name&quot;: &quot;[concat(parameters('virtualMachineName'),'/joindomain')]&quot;,
              &quot;location&quot;: &quot;[resourceGroup().location]&quot;,
              &quot;dependsOn&quot;: [
                  &quot;[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]&quot;
              ],
              &quot;tags&quot;: &quot;[parameters('tags')]&quot;,
              &quot;properties&quot;: {
                  &quot;publisher&quot;: &quot;Microsoft.Compute&quot;,
                  &quot;type&quot;: &quot;JsonADDomainExtension&quot;,
                  &quot;typeHandlerVersion&quot;: &quot;1.3&quot;,
                  &quot;autoUpgradeMinorVersion&quot;: true,
                  &quot;settings&quot;: {
                      &quot;Name&quot;: &quot;[parameters('domainToJoin')]&quot;,
                      &quot;OUPath&quot;: &quot;[parameters('DomainOuPath')]&quot;,
                      &quot;User&quot;: &quot;[concat(parameters('domainToJoin'), '\\', parameters('domainJoinUserName'))]&quot;,
                      &quot;Restart&quot;: &quot;true&quot;,
                      &quot;Options&quot;: &quot;[parameters('domainJoinOptions')]&quot;
                      
                  },
                  &quot;protectedSettings&quot;: {
                      &quot;Password&quot;: &quot;[parameters('domainJoinUserPassword')]&quot;
                  }
              }
          },
          {
              &quot;type&quot;: &quot;Microsoft.Compute/virtualMachines/extensions&quot;,
              &quot;name&quot;: &quot;[concat(parameters('virtualMachineName'), '/Notepadplusplus')]&quot;,
              &quot;apiVersion&quot;: &quot;2015-05-01-preview&quot;,
              &quot;location&quot;: &quot;[parameters('location')]&quot;,
              &quot;dependsOn&quot;: [ &quot;[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]&quot; ],
              &quot;tags&quot;: &quot;[parameters('tags')]&quot;,
              &quot;properties&quot;: { &quot;publisher&quot;: &quot;Microsoft.Compute&quot;,
              &quot;type&quot;: &quot;CustomScriptExtension&quot;, &quot;typeHandlerVersion&quot;: &quot;1.3&quot;, &quot;autoUpgradeMinorVersion&quot;: true,
              &quot;settings&quot;: { 
                  &quot;fileUris&quot;: [ &quot;https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.9/npp.8.1.9.Installer.x64.exe&quot;],
                  &quot;Restart&quot;: &quot;true&quot;
              },
              &quot;protectedSettings&quot;: {
                  &quot;commandToExecute&quot;: &quot;npp.8.1.9.Installer.x64.exe /S&quot;   
              }
          }
      },
          {
              &quot;type&quot;: &quot;Microsoft.Compute/virtualMachines/extensions&quot;,
              &quot;name&quot;: &quot;[concat(parameters('virtualMachineName'), '/SophosInstall')]&quot;,
              &quot;apiVersion&quot;: &quot;2015-05-01-preview&quot;,
              &quot;location&quot;: &quot;[parameters('location')]&quot;,
              &quot;dependsOn&quot;: [ &quot;[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]&quot; ],
              &quot;tags&quot;: &quot;[parameters('tags')]&quot;,
              &quot;properties&quot;: { &quot;publisher&quot;: &quot;Microsoft.Compute&quot;,
              &quot;type&quot;: &quot;CustomScriptExtension&quot;, &quot;typeHandlerVersion&quot;: &quot;1.3&quot;, &quot;autoUpgradeMinorVersion&quot;: true,
              &quot;settings&quot;: { 
                  &quot;fileUris&quot;: [ &quot;https://dzr-api-amzn-eu-west-1-9af7.api-upe.p.hmr.sophos.com/api/download/cfd5ef35d72a66d96e761ba9222464d8/SophosSetup.exe&quot; 
                  ]
              },
              &quot;protectedSettings&quot;: {
                  &quot;commandToExecute&quot;: &quot;SophosSetup.exe --quiet --devicegroup=\&quot;Test servers\&quot;&quot;   
              }
          }
      }
  </code></pre>