But I still can't accept the GitLab-runner.exe from the other folder.
You need to update the PATH system environment variable to include a path to this executable. You indicated that %gitlab_runner% is working, which is an indication, your system variable GITLAB_RUNNER system variable is configured properly.
However, you have a conflicting system variable that should be removed, it's necessary to define GITLUB_RUNNER as a user and system variable. You really should delete both of those system variables, and only create user system variables, unless this machine is used by multiple users. If that is the case, then the user variables should be deleted, and only the system variables used.
You can still create a user variable GITLAB_RUNNER so you can use %GITLAB_RUNNER% in a script to execute the executable.
Need to add: the environment that I created by CLI (%gitlab-runner%) not works after rebooting
You have not made a GITLAB-RUNNER environmental variable. So %gitlab-runner% won't work until you do. However, the reason your unable to launch GitLab-runner.exe from any directory is due to the PATH variable still not containing a the not being updated to include d:\GitlubRunner\
girlab,gitlub, orgitlab? Is it written with a-or with a_? – u1686_grawity Nov 26 '20 at 15:44%gitlub-runner%works, means your system environmental variable is working, you should edit your question and clarify your question. – Ramhound Nov 26 '20 at 15:44%gitlab-runner%actually works means the variable is configured. Have you performed a reboot? You don't actually need two variables, the single user environmental variable, is more than enough. The reason you are unable to launchgitlab-runner.exefrom any location is due to the fact your PATH variable hasn't been updated. – Ramhound Nov 26 '20 at 15:50