The lacrimal nerve is a major general sensory branch of the ophthalmic nerve [V1], which passes forward in the orbit at the margin between the lateral wall and roof.
The postganglionic parasympathetic and sympathetic fibers pass with the lacrimal nerve to the lacrimal gland.