by showing that you're modifying files etc. you're invalidating all lines of support.
there's no funamental difference between running from commandline or double clicking the exe, so if it fails in one situation but not the other it is almost certainly something of your own doing or a serious problem with your entire Windows install.
You should be testing with the official version from
https://www.mamedev.org/release.phpONLY
extracted into a clean folder, not overwriting an old one.
it will either work, or it won't.
if it doesn't work, run with "mame64 -cc" to create a mame.ini
in that mame.ini change
video auto
to
video bgfx
or
video opengl
if it STILL doesn't work with either of those options, it isn't going to work reliably no matter what you do.
since you've already basically shown that your hardware is incapable of supporting MAME's video card requirement it sounds like you've hacked around that problem and found the reason those messages are there in the first place. A lot of the hacks you'll find around have severe unwanted side-effects.