-1
I googled this, and I couldn't find an answer. What's a command that you have to UAC elevation in cmd.exe to run?
-1
I googled this, and I couldn't find an answer. What's a command that you have to UAC elevation in cmd.exe to run?
3
There are several commands that can't be performed unless you're running in an elevated command prompt. For example, setting a network adapter to DHCP:
netsh interface ipv4 set address "Local Area Connection" dhcp
However, this will never invoke the UAC elevation dialog. You'll simply be notified that the command requires elevation:
C:\Users\Oliver>netsh interface ipv4 set address "Local Area Connection" dhcp
The requested operation requires elevation (Run as administrator).
Using a command that makes a permanent and system-wide change just to check something is a recipe for disaster: you can never predict and/or eliminate all the side effects. – ivan_pozdeev – 2017-04-17T21:16:18.803
0
Another would be REG ADD
to a registry key that you don’t have modify access to; e.g., anything (most things?) in HKEY_LOCAL_MACHINE (HKLM).
Related: Check if current Command Prompt was launched as the Administrator.
– G-Man Says 'Reinstate Monica' – 2015-02-08T06:41:18.613"net file" is a good one, because it doesn't require trying to change settings. – TOOGAM – 2017-04-16T18:51:33.443
1One of many examples would be
ipconfig /all
– Ramhound – 2013-05-03T17:26:12.837