is it possible to execute a code directly after you have logged on into a computer?
What I want is creating MySite directly after you have logged on into the computer (before browsing to mySite).
The MySite (site collection actually) gets created for the user automatically if he doesn't have one already (provided he has the rights to have one). Is enough for the user to navigate to this page _layouts/mysite.aspx (e.g. assuming your MySite Host with "personal" being the mapped path) then using http://mySiteHost/_layouts/mysite.aspx would automatically create site everytime user navigates to the page OR if he has one, it will redirect to http://mySitesHost/personal/username - "username" also depends on how you configured in UPSA.
If you really want to execute code upon computer launch, you need also to account for Login, because if don't have Kerberos Enabled it would ask user to authenticate!
It would be enough to have the default page in your browser ?