I use PathMod() whith admin rights, whith this I update registry key but operating system not read this registry until next reboot or restart the session.