I'm trying to create a batch script that searches through the computer for desktop.ini files, and deletes the line LocalizedResourceName=.*, to let Windows explorer show the true folder names instead of the translated ones. (On a non-english system)

I've started from the script written here and I copy-pasted the snippet found here to make the script able to ask for admin permissions on his own.

This is actually the second or third iteration of the script and I still can't get it to work properly; for example, that weird ampersand structure is my attempt to implement a "proceed if success" logic, but apparently it never reaches the echo at the end.

I'd like to build a definitive and "correct" version of the script that performs what described above, I'm looking for suggestion like "you should do that this way instead", or "you see that? that's wrong, do this instead" or "is usually best to do that this way".

I am no batch expert but I'd really like to have a working, "smart", version of this script.

This is the current version:

My post can't contain batch code, even if inside [CODE][/CODE], I get blocked by cloudFlare, here's the gitHub repo

As you can see I've doubled the loops, one for C: or whatever and the second one is hard-coded for D: this is ugly, also I'd like to exclude in an elegant way irrelevant folders like Windows etc, that cause the script to hang on kilometres long paths.

This version has problems reading a lot of the desktop.ini files, and never reaches the (print) ECHO instruction at the end of the ampersand chain.

Here's also a temporary screenshot, made with carbon (which doesn't have batch highlight)
Click image for larger version. 

Name:	carbon.png 
Views:	9 
Size:	1.87 MB 
ID:	240228