Tag Info

New answers tagged

0

Found a good answer in the duplicate, here. You can use whoami with the /groups parameter to see the the permissions assigned to the current user. These permissions will also be session-specific - i.e.: if the sesson is not elevated, whoami /groups will lack the group that is given to elevated sessions. Usage of the whoami command, and the /groups ...


0

If you clearly want to see if the session is elevated, and not use it in a script, just check the title. It will say Administrator: in the title as well, indicated that the commandprompt is running elevated. In addition, a cmd that is started elevated will not start in your user directory, but in the c:\windows\system32 folder. Scriptwise, you can run ...


1

As stated here it's done with the help of Cygwin's command id: id -G | egrep -q '\<544\>' && set prompt = '# || set prompt = '\$ ' Or in my case with bash i added this to the end of /etc/bash.bashrc (Note that I removed the \n that comes in default prompt): id -G | egrep -q '\<544\>' && PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h ...



Top 50 recent answers are included