Well as the readers above posted, latency is definitely crucial in determining whether a virus will be life long (as with the case of the Herpes or the HIV viruses.)
It also depends on the virus' ability to evade the immune defenses in such a way that the host can't really recognize if the pathogen is self or non-self. This happens with the HIV and for this reason, it can go on living for a long time (because it is constantly evading the host immune defenses); the Influenza virus is similar (constant antigen switching exhibiting variable hemagglutinin and neuraminidase activity, which accounts for the various variants of the virus.)
But the ability of a virus to establish latency is what determines whether the virus will be living in the host for an indefinite period.