If you want to run a program when you log-in to Windows, you do not have to write a program to do that ... let alone a Perl program. Study your business requirement and consider all of the possible alternatives for solving that problem ... no doubt, it is an extremely common one that has been solved before. Never do anything that has already been done.