Welcome to my world! That's the way browsers work. Every time they start, they just make more junk.
So before I do my weekly backup, I clean out all the junk, and then quickly shut down the PC, not giving any program time to make more junk.
My backup program runs from a bootable Flash Drive, totally bypassing Windows.
I'm so sorry! Apparently, I've been misleading, without ever meaning to.
But, I would NEVER run a batch file, or any such thing, from the RUN box, or a CMD (DOS) prompt.
Things I do run from the RUN box are, CMD, Regedit, Services.msc, and MSConfig.
From anyplace in your computer, or on a Flash Drive, etc. you can run a Batch file by simply Double Clicking on it, as you would to run any executable file. That compatibility power has been built into Windows since day one. So, Windows has always been Backward Compatible with DOS, using its built in Command Interpreter.
In the case of my Cleanup.bat program, I put it in a folder (Directory) that I create in the root directory of C:, then I right click on it and select, from the context menu, "Send to Desktop and Create a Shortcut".
OK, so now I have a shortcut on my desktop where I can run my batch file with just a double-click.
But I really want to run my batch file as the "Administrator". So, I right click on my new shortcut and in the menu that pops up, I click on "Properties" and then in the new menu I click on Advanced. In the little window that pops up I click on "Run as Administrator", OK that box, apply changes and close the window. NOW, when I click on the shortcut, my Cleanup batch file with run with Administrator privileges. For some commands in my batch file, it makes a difference.
When explaining the process this way, it sounds like a long and drawn out process, but when you've done it a few thousand times, like I have, it's a ten second process.
The one line, in my batch file, to dump the "Prefetch" folder, was so different, that I first had to first take Ownership of the folder, with the "Takeown" command, before I could delete the Prefetch files. So it took two lines of code, in the batch file, to do one little job.
TAKEOWN /F "C:\Windows\Prefetch"
del /F /S /Q "C:\Windows\Prefetch\*.*"
But, when I'm going to run certain batch files from my Utils flash drive, for instance, I have to right click on the batch file, and from the context menu that pops up, I'll click on "Run as Administrator" or I won't get the required results from the batch file.
No, I didn't get that out of a book, only from the college of hard knocks. Or more accurately called "Experience".
When you leave the realm of User, and enter the realm of Programmer or Technician, things can get really interesting.
But, the rewards can be, Unending. If, heaven forbid, I live to be 100, I'll never fully understand all the in's and out's of Windows, but I'm working on it!
I just keep asking questions, and getting answers, from people who know more than I do.