Here is the below step, which help you to set enviroment variables in window 11.
- Press the Windows key+X to access the Power User Task Menu.
- In the Power User Task Menu, select the System option.
- In the System window, scroll to the bottom and click the About option.
- In the System > About window, click the Advanced system settings link at the bottom of the Device specifications section.
- In the System Properties window, click the Advanced tab, then click the Environment Variables button near the bottom of that tab.
- In the Environment Variables window (pictured below), highlight the Path variable in the System variables section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each directory path is separated with a semicolon, as shown below.
C:\Program Files;C:\Winnt;C:\Winnt\System32