/c setx <Name> <Value>
The /c flag carries out the command specified and then terminates.
This command replaces <Name> and <Value> with the name of the environmental variable you are creating or editing, and the value you wish to assign to that variable.
You can create a custom execute to remove these environment variables when uninstalling the package. Repeat the procedure but select the Post All Uninstall option while setting up the custom execute. In step 3, use /c setx <Name> “” to reset the variables. However, you should exercise caution when using this process. If multiple packages share the environment variables, using this command can cause these packages to fail after uninstalling the package.