title: Alternative to nested Else If statements with different outcomes?
body: <p>Is there any better way of handling nested else if statements that have different outcomes?</p>
  
  <p>Here is an example of one of my nested statements to explain:</p>
  
  <pre><code>            If My.Computer.Network.Ping(computerName) = True Then
                  Call InstallVS(computerName)
                  If My.Computer.Network.Ping(computerName) = True Then
                      Call PEC(computerName)
                      If My.Computer.Network.Ping(computerName) = True Then
                          Call RemoveSoftware(computerName)
                      Else
                          Call WriteLog(computerName &amp; " lost connectivity while attemping to remove the temp software")
                      End If
                  Else
                      Call WriteLog(computerName &amp; " lost connectivity while Forcing Communication")
                  End If
              Else
                  Call WriteLog(computerName &amp; " lost connectivity while attemping to Install")
              End If
  </code></pre>
  
  <p>I have a requirement to lots of these type of statements, some are smaller, some are a lot larger.</p>