The Wiener index is one of the oldest molecular-graph-based structure-descriptors. The study of Wiener index is one of the current areas of research in mathematical chemistry. It also gives good correlations between Wiener index (of molecular graphs) and the physico chemical properties of the underlying organic compounds. That is, the Wiener index of a molecular graph provides a rough measure of the compactness of the underlying molecule. The Wiener index W(G) of a connected graph G is the sum of the distances between all pairs (ordered) of vertices of G. .A thorn graph G* can be generated from a parent graph G by attaching p new vertices to each vertex of G. The basic concepts of thorn graphs proposed by Gutman are extended to the wider concept of generalized thorny graphs. In this paper, WienerIndex of some classes of (generalized) thorn graphs like thorn paths, thorn cycle, thorn stars through MATLAB is presented.