Sorry for maybe repeating an old question but I still cannot find an appropriate answer.
Is it possible to get a batch script to request user account elevation if needed?
I want to run a simple batch script containing some commands which require admin rights (e.g. netsh wlan stop hostednetwork or similar commands)
If such a batch is run with normal rights it just hangs or responds with an error message.
Why can't a regular batch not just automatically ask for UAC when it's needed?
Most installers or update programs come up with an UAC prompt when they are run with normal rights.
The question isNOT "how can I run a command prompt with elevated rights?" This is answered frequently.
The question is: how can I get an UAC request dialog from a batch which is invoked with normal rights when it needs to execute a command which requires admin rights?