Ajay_9 0 Newbie Poster

I am developing app in which I want to access my laptop web cam and click the snap saved it automatically to a particular directory when someone tries to login if the entered detail is correct then click the snap and save as know.jpg otherwise save it by name of unknown.jpg and system shutdown on button click(i.e. when someone entered detail press the login button) pllz help me ....
thanks in advance