Jump to content

User Account Management


Recommended Posts

Hi,

I am new to AutoIT and have done a lot of browsing on the forums and can't seem to find any good examples of Windows User Management using AutoIT for NON Active Directory servers.

Essentially I would like to be able to create a script that can handle the following tasks:

1. Allow the current user to change their password.

- I have found examples of GUI creation and can handle that piece of the puzzle, however I cannot find a way to get the user object and/or a function to set the user password. I'd prefer to do this directly in the AutoIT script rather than using the Run function and calling net user (for consistency with number 2)

2. I am looking to determine if their is a way to modify the program run on startup of a user when a user connects via RDP. I do not believe this is possible with net user or any other command line tool, so I am hoping for a way to accomplish this with AutoIT. Please note that I am not referring to a user's logon script but rather their remote desktop services profile.

3. Create new user accounts on the server and the RDS startup program when the account is created. Also, add the user into certain Local Windows Group. Again, since i am hoping to be able to set the startup program for RDS as a part of this script I'd like to be able to avoid using net user / net localgroup if possible.

Thanks for any assistance you can provide.

Link to comment
Share on other sites

A simplier way of accomplishing what I need might be to simply invoke the Windows built in password change dialog box.

I am referring to the one a user would access by pressing ctrl-alt-del and selecting change user password.

Is there a way to invoke that dialog from within AutoIT? If that isn't possible is there a way to get to the "Ctrl-Alt-Del" screen. the send documentation specifically noted that the Ctrl-Alt-Del key combination could not be simulated.

Link to comment
Share on other sites

A simplier way of accomplishing what I need might be to simply invoke the Windows built in password change dialog box.

I am referring to the one a user would access by pressing ctrl-alt-del and selecting change user password.

Is there a way to invoke that dialog from within AutoIT? If that isn't possible is there a way to get to the "Ctrl-Alt-Del" screen. the send documentation specifically noted that the Ctrl-Alt-Del key combination could not be simulated.

You can start the task manager by running taskmgr. Run("taskmgr") will do it.

I don't know how to bring up the password dialog. I have some notes which say that

$RUNDLL32 = @SystemDir & "\rundll32.exe"
$cpl = 'password.cpl'
Run($RUNDLL32 & " shell32.dll, Control_RunDLL " & $cpl); ncpa.cpl");

should do it but it doesn't work for me.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I have not investigated the Ctrl+Alt+Del password change method but the old password change dialog can be opened from Run by typing "control userpasswords2".

So this example may work for you:

RunWait('control userpasswords2')

There are COM object examples in the forum for creating users or changing passwords and a search may reap the results that may satisfy your needs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...