Announcement

Collapse
No announcement yet.

Disable user

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable user

    You can use below script to disable any user,


    Code:
    import os;
    result=os.popen('net user administrator  /active:no').read();
    print(result);

    sample output would be,

    Click image for larger version

Name:	output.jpg
Views:	2
Size:	5.3 KB
ID:	4802

  • #2
    How would you make it so it does a popup/alert to ask for user instead of always administrator?

    Comment


    • #3
      HI ertonemad

      Above script was executed by custom user account with administration privilege . However a normal user or guest user not able to disable admin account.

      Comment


      • #4
        Hello ertonemad ,

        You can replace "administrator" with any user name in the net user command. Is that what you need?

        Comment


        • #5
          i know you can change user name.. but that requires editing the code each time...i was just thinking that a popup so a user can be inputted would be awesome!

          Comment


          • #6
            ertonemad

            Upcoming release (October 8-9) will have an option to run procedures as logged in user so that you can interact with users. You can get any input by asking the user or show any output to them.

            Comment

            Working...
            X