fix(system): add admin rights check for global path variable addition
This influences scoop shim add myapp args -g command. If global shimdir is not in global path by previous scoop install main/myapp -g command, you'll encounter error when run scoop shim add myapp args -g first time.
Let's use command scoop shim add myapp cmd.exe args -g for example:
Before, if we don't have global shim dir in global path:
The error message "$envRegisterKey = $registerKey.OpenSubKey('Environment', $true) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "OpenSubKey" with "2" argument(s): "Requested registry access is not allowed." means we need admi privilege to perform this command.
After, if we apply this pull request and run the same command again:
The error message would be more clarified.