This project can be a little tricky if you do not have much experience dealing with code/scripts. If you are having issues with people accessing your computer without your permission you can now catch them in the act!
You will need a computer with a webcam and internet access for this project. For any of the pictures, if you cannot see them fully, simply click the "I" in the bottom corner of the picture.
This is my first Instructable, constructive criticism is appreciated.
Step 1: Ingredients
Notepad++ will enable you to edit these files with ease. It is very powerful and can also be used for general text editing.
The RAR Package *You will need Winrar to extract this. If you don't already have it you can get it here (32-bit)(64-bit)
This RAR includes Email.vbs (the core or the email sending part - adapted from here ); Snapz.exe (from here) ; and Send.bat which ties all both of the previous together.
NONE of these are viruses, if your scanner tells you otherwise then it is a false positive.
Step 2: Initial Setup
Step 3: Replacing Examples in Email.vbs
First, open up Email.vbs with Notepad++ You can right-click and choose "Edit with Notepad++".
Once you are in, you should see a bunch of code.
To start, change firstname.lastname@example.org to whatever your email address is. Change password to your email password.
Change the "smtp server goes here" to whatever your email provider's SMTP server is. Change smtp server port # to whatever your email provider's SMTP server port is.
Common Email Providers
Gmail - smtp.gmail.com Port - 465
Hotmail - smtp.live.com Port - 587
Yahoo - smtp.mail.yahoo.com Port - 995
POP Yahoo - plus.smtp.mail.yahoo.com Port - 465
MSN - smtp.email.msn.com Port - 110?
AOL - smtp.aol.com Port - ?
For Hotmail, Yahoo, MSN, and AOL you can change the "smtpauthenticate") = 1" to "smtpauthenticate") = 0" experiment; I only used Gmail so some of these may not be correct.
Step 4: Snapz Setup
Step 5: Editing Send.bat
Once again, use Notepad++ to open up Send.bat. Replace TargetAdress@domain.com with the address that you want to send the picture to.
Replace "Subject goes here" with your subject. I used "User logged on". Replace "Message goes here." with whatever you want your message to be. I used "User logged on to %username% at %time%". The %username% is replaced by the system to the current user logged on and the %time% is replaced with the current time.
Finally, navigate to wherever you have placed your snapz.exe and copy the directory. Replace "C:\directory\snapz.dib" with your own directory. Remember to include the snapz.dib in your directory, otherwise it won't be able to locate the webcam picture.
Step 6: Running on Login
If done correctly, when you log into your account your webcam should take a picture and fire off an email to a specified address with a specified subject and body, with the picture attached.