I’m not sure you can… The idea of that .bat file is, I think, to save the user from having to manage the separate Java and SDK installs that, prior to 4.25, one had needed to put into UE project settings.
My memory is hazy (the first video was certainly successful for me on this point), I can’t recall the specifics of setting up Android Studio vs. the UE androidsetup.bat that came with it, but I think the Android Studio install might have prompted you to where you want the SDK. I don’t know if it has to be in AppData, but my guess is that once you download the SDK that’s just where it goes, along with other dependencies like gradle and such:
To me, the question would be does the Android Studio 3.5.3 install let you put the SDK on D:, and if so does running androidsetup.bat find it. If not, I would experiment with temporarily making room on C: and letting it set it up the way it wants to, then once you see it succeed, try copying those directories onto D:, remapping your environmental variables, and delete the originals off of C.
I will tell you, this took a lot of un installing and re-installing of Android Studio for me, which is why I include the links on how to do a full uninstall of Android Studio, and there is information in those comments I had also needed to do in order to get a clean uninstall.
Update: Check this out
I’m trying to learn more about standalone packaging today, and at 5:19 it shows that is possible to edit that AndroidSetUp.bat, fwiw