Tom Hanks gave one girl scout troop a memory they will never forget.

The actor - wearing sunglasses and a baseball cap - bought four boxes of cookies from the girl scouts outside a typewriter store, reported Los Altos Town Crier. The girls didn't realize who he was until he started to walk away, so they ran to catch up with him.

"Are you Tom Hanks?" one of the girls, Archana Appanna, reportedly asked.

Hanks revealed his identity to the excited girl scouts and took pictures with them. After that, he lingered by their table to help sell their cookies.

His strategy was simple - no fans got a picture with him without buying a box of cookies first!

Hanks was in town to initially repair a typewriter with his college-aged son, reported Los Altos Town Crier. Hanks is apparently a big typewriter collector and left the store with two vintage Smith-Coronas.

Hanks, 58, recently appeared in the Carly Rae Jepsen video for her single "I Really Like You," alongside the singer and Justin Bieber.