Edge Extension: Microsoft Edge browser not detected

"I tried the command but it said ”The directory name is invalid”
That’s why i asked which version you had. The command i gave was for the community edition.
For the enterprise version you can find it here:

so it would be like this for you
(below are 2 separate lines):

cd C:\Program Files (x86)\UiPath\Studio\UiPath
SetupExtensions.exe /Edge

It might also have to do with the version you are running. People had issues before 2 months ago: