Use this UEFI tool to set up ShellOpt environment variable.
UDK2018
VC2015
1. Create "ShellOpt" folder in UDK\AppPkg.
2. Put ShellOpt.c and ShellOpt.inf in "ShellOpt" folder.
3. Add "AppPkg/Applications/ShellOpt/ShellOpt.inf" in "[Components]" of "ShellOpt\ShellOpt.dsc"
4. Build it