First, no need to use cmd here as reg is an exe. While this seems innocuous, it can cause issues as it adds a layer of execution and redirection.
But yes, as far as I can tell, this is correct assuming you are using a Run Command Line task although keep in mind that you must run this after the Setup Windows and ConfigMgr task for it to impact the deployed OS.
Have you tested this? Are you having an issue? If so, have you examined the smsts.log?