Or put something into /etc/profile.d and run at every shell startup, or put something into /etc/ld.so.conf.d and inject code into every process started on the system, or put something into /etc/init.d and run at every boot... (continue ad infinitum)
If you let code overwrite the files that make up your system configuration, you're going to have a Bad Time on any OS; this isn't somehow specific to Windows and the registry.
run any command as any user once a minute