Short answer: Yes.
I was going to refer you to Windows Recorder, but apparently I'm a bit out of touch - Windows Recorder was dropped from Win 95 and later. There are loads of shareware equivalents - see this
Google search - but apparently Win XP etc have a "hidden" tool known as the Windows Scripting Host (WSH) which can do what you want without having to add any extra software to your machine - see
here .
Hope this helps,
cbl.