I have been trying to use %userprofile% to pull the users profile info and set a variable in the registry. The Variable is only pulling ?c:\documents? when I run the set command It shows ?C:\documents and settings\profile name?
Seems like there is a space problem using %userprofile%
here is a sample of how I tried to use the variable ?regchg “SYSTEM\CurrentControlSet\Control\Session Manager\Environment” MigrateProfile REG_SZ %USERPROFILE% > NUL?