First install samba
apt-get install samba
apt-get install smbfs
apt-get install cupsys
after this installations
open a browser and type
http://localhost:631/
you will get a cups administration page
select add printer
then type Name : anything
Location : anything
description : anything
now you will get a dropdown menu
select windows printer via samba
now there is text box Device URI
type smb://mycomputer/1015 ( see I have a shared hp 1015 printer at computer name called mycomputer and share name of printer is 1015 with permision to all)
after selecting uri u will get a page for selecting make
select your printer make in my case it is HP
next page select model HP Laserjet series PCL 4/5 CUPS v 1.2 (en)
now printer installation is over
you can make a test print now