Use GetWindowsDirectory() instead of %SYSTEMROOT%.