Windows attaches security token to an app which cannot be changes unless you spawn another process. So sudo-like functionality makes sense. But Windows security is a bit complicated - not for user consumption ))
To edit c:/Windows/system32/drivers/etc/hosts
you need to be an administrator + firewalls / antivirus might "lock" the file + some paths are secured non-standard.
So I just start Emacs elevated instead so I don't need sudo
(utilizing Cygwin, run
is for hiding a Conhost terminal window):
cygstart --action=runas run emacs-w32
Source code: https://hg.defun.work/utils/file/tip/emacs/re.bat