I'm using Comfyui recently, and I don't know why. Sometimes Git cannot be accessed, and sometimes the folder cannot be accessed. I just want to run the bat command directly in administrator mode and give it the highest permissions. Try it. But for such a simple question, after searching for a long time, I found a lot of unreliable tutorials, and it took a lot of code to solve it. But in fact, just add a paragraph to the bat file. It will jump to the folder where the current bat text is located.
Just add the following code.
cd /d "%~dp0"