certain castanospermine ester derivatives of the formula : ## str1 ## wherein r , r 1 and r 2 are each independently hydrogen , c 1 - 14 alkanoyl , c 1 - 14 alkenoyl , cyclohexanecarbonyl , c 1 - 8 alkoxyacetyl , ## str2 ## naphthalenecarbonyl optionally substituted by methyl or halogen ; phenyl wherein the phenyl is optionally substituted by methyl or halogen ; cinnamoyl ; pyridinecarbonyl optionally substituted by methyl or halogen ; dihydropyridine carbonyl optionally substituted by c 1 - c 10 alkyl ; thiophenecarbonyl optionally substituted by methyl or halogen ; or furancarbonyl optionally substituted by methyl or halogen ; y is hydrogen , c 1 - 4 alkyl , c 1 - 4 alkoxy , halogen , trifluoromethyl , c 1 - 4 alkylsulfonyl , c 1 - 4 alkylmercapto , cyano or dimethylamino ; y &# 39 ; is hydrogen , c 1 - 4 alkyl , c 1 - 4 alkoxy , halogen or it is combined with y to give 3 , 4 - methylenedioxy ; y &# 34 ; is hydrogen , c 1 - 4 alkyl , c 1 - 4 alkoxy or halogen ; with r , r 1 and r 2 being selected in such a way that at least one of them , but not more than two of them , is hydrogen ; are disclosed to be effective in treating diseases caused by herpes simplex virus types 1 and 2 .