Path Variable and VS Project Update

I just tried an old backup project but the directories are wrong compared to where UE4 is currently installed. It looks like hundreds of dependencies need to be manually fixed. Is there a way to setup a path variable for UE4 to prevent this from happening again for new projects, which use visual studio?

Also, I’m now using VS 2022. The saved project is for VS 2019. The IDE is freezing a lot when going through configuration options so I can’t even get to this area ATM.