in reply to how to run your program when the system is started....

i want to run it as soon as the user log in the window or linux operating systems
Most linux distributions use PAM for authentication, perhaps you can hook your script into one of the /etc/pam.d/common-* files.