How to make a registry key pull %username% variable

windows 7windows-registry

I have a logon script that imports a registry key. No big deal. This works.

My wish is to have the registry populate the current user logged on into that field.

So presently I have to manually edit the .reg file and input "domain\user" for each user in our department.

Is there a way to substitute "domain\user" for "%username%" that way the registry key is imported by User D and the registry key populates "domain\UserD" ?

Thank you for your input. Using Windows 7.

Best Answer