Hi, I'm a cat
but I wonder if is there a way - via commandline - to check if the current user have all administrator privileges. I need to change the state of a variable so that if yes --> become 1, if no --> become or stay to Zero.
And is it possible to automatically change via commandline the windows 10 settings so that the current user assumes all administrative privileges? thanks
+ Reply to Thread
Results 1 to 5 of 5
-
-
and possibly I need to set windows so that when I run one program, or a batch, by default it have to "run as administrator". I cannot understand why, because I'am already administrator but to run as administrator I alwais clic the right button as manually select "run as administrator". Is there a way to set windows so that it runs as administrator alwais, and anything? thanks
-
Perhaps by disabling UAC you'll get the functionality you want. Windows, by default, has not behaved that way since XP
-
Why you never search for this kind of information? It took me like 5 minutes...
http://www.robvanderwoude.com/clevertricks.php
https://stackoverflow.com/questions/7985755/how-to-detect-if-cmd-is-running-as-adminis...ted-privileges -
[Attachment 46222 - Click to enlarge]
problem solved cat
this check if or not
Code:@echo off goto check_Permissions :check_Permissions echo Administrative permissions required. Detecting permissions... net session >nul 2>&1 if %errorLevel% == 0 ( echo Success: Administrative permissions confirmed. ) else ( echo Failure: Current permissions inadequate. ) pause >nul
thanks
Similar Threads
-
XSplit Trying to Run as Admin Under Windows?
By pone44 in forum Newbie / General discussionsReplies: 8Last Post: 30th Mar 2017, 04:19 -
How to bypass admin password?
By aruwin in forum ComputerReplies: 6Last Post: 29th Sep 2015, 00:06 -
How do i change to Admin on my laptop ?
By vhelp in forum ComputerReplies: 7Last Post: 23rd Jun 2015, 08:49 -
How to check if AviSynth is installed (from a Windows batch file)
By as264 in forum EditingReplies: 9Last Post: 10th Feb 2014, 09:19