From the abstract:
"These authors report that infection with a different herpes virus, herpes simplex virus type 1 (HSV1), leads to a similarly increased risk of later developing SD [Senile Dementia]. Further, when the authors looked at patients treated aggressively with antiherpetic medications at the time, the relative risk of SD was reduced by a factor of 10. [...] antiherpetic medication prevented later SD development in 90% of their study group"
So yes.
Source: https://sci-hub.tw/10.3233/jad-180266#