Perhaps because %userprofile% has not been established quite yet when it's called during LOGON

Maybe place it in the RUNONCE key of the registry