Consider using RefreshEnv.cmd to load the updated environment variables from the Registry.
RefreshEnv.cmd