To do this open regedit, go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" Key and add a new string entry in the right side section.  Here is what I entered into the Edit string dialog:

Value name:
TeamViewer

Value data:
/min "C:\Program Files (x86)\TeamViewer\TeamViewer.exe"

Make sure to keep the quotation marks around the path.  Additionally you may need to edit the path name if you installed the program into a different folder.