Jump to content

Recommended Posts

Hello, I would like an automated domain migration with User Profile Wizard. In the window I have the list of local profiles, I would like to click on the right profile that I will have chosen beforehand. I tested another solution and with auto mouse clicker I can use the text click function with a regex and the cursor will select the right profile automatically. The problem is that I want to edit the script for each computer with variables and the script is not editable with notepad. So I want to use Autoit to do the same thing but I can't. Can someone help me?

I try the finder tool but i can't find the text nicecube 

 

User Profile Wizard
Profiles stored on the computer:
&Disable local accounts
De&lete local accounts
Show &Unassigned Profiles
Create Copy
< &Précédent
&Suivant >
Annuler
&Share Profile
User Profile Wizard
@Domain@
Join Domain
Set as default logon
Enter the domain, or select the local computer name:
Enter the account name:
Join &Workgroup
Azure AD
User Profile Wizard
Local Computer (the computer this wizard is running on)
Another Computer:
B&rowse...
User Profile Wizard
Welcome to User Profile Wizard Professional Edition
This wizard helps you to migrate an existing User Profile so that it can be used by another User account.

To continue, click Next.
Build 24.1.1285
Terminer
Aide
>>>> Window <<<<
Title:  User Profile Wizard
Class:  #32770
Position:   501, 115
Size:   513, 400
Style:  0x94C800C4
ExStyle:    0x00010101
Handle: 0x01B70EC8

>>>> Control <<<<
Class:  SysListView32
Instance:   1
ClassnameNN:    SysListView321
Name:   
Advanced (Class):   [CLASS:SysListView32; INSTANCE:1]
ID: 1027
Text:   
Position:   47, 101
Size:   395, 107
ControlClick Coords:    185, 38
Style:  0x5011080D
ExStyle:    0x00000204
Handle: 0x000125E6

>>>> Mouse <<<<
Position:   741, 285
Cursor ID:  0
Color:  0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
User Profile Wizard
Profiles stored on the computer:
&Disable local accounts
De&lete local accounts
Show &Unassigned Profiles
Create Copy
< &Précédent
&Suivant >
Annuler


>>>> Hidden Text <<<<
&Share Profile
User Profile Wizard
@Domain@
Join Domain
Set as default logon
Enter the domain, or select the local computer name:
Enter the account name:
Join &Workgroup
Azure AD
User Profile Wizard
Local Computer (the computer this wizard is running on)
Another Computer:
B&rowse...
User Profile Wizard
Welcome to User Profile Wizard Professional Edition
This wizard helps you to migrate an existing User Profile so that it can be used by another User account.

To continue, click Next.
Build 24.1.1285
Terminer
Aide

 

image.png.a3502cbbadab434548ec9ded0460ea18.png

 

 

 

Link to post
Share on other sites
5 hours ago, Nine said:

You may try to use list view commands (e.g. ControlListView - _GuiListView* UDF)

Thanks for your support, I am looking the documentation but I can't find anything that relates to a UDF what do you mean? Can you give me an example if you can.

https://www.autoitscript.com/autoit3/docs/libfunctions/GUI GuiListView Management.htm

Im new to autoit im still learning it a great piece of software ! So far i have this but it select nothing 

#RequireAdmin
#include <GuiListView.au3>

Run("C:\HelpOX\ProfWiz\Profwiz.exe")
ProcessWait("Profwiz.exe")
WinWaitActive("User Profile Wizard")
ControlClick("User Profile Wizard", "", "[ID:12324]")
Sleep(250)
ControlClick("User Profile Wizard", "", "[ID:12324]")
Sleep(250)
ControlListView("User Profile Wizard", "", "[CLASS:SysListView32; INSTANCE:1]", "SelectAll")
Sleep(250)
ControlListView("User Profile Wizard", "", "[CLASS:SysListView32; INSTANCE:1]", "Deselect", 2, 5)
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32; INSTANCE:1]", "GetText", 0, 0))
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32; INSTANCE:1]", "FindItem", "nicecube", 1))
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32; INSTANCE:1]", "GetSelected", 1))

 

Edited by nicecube
Add code
Link to post
Share on other sites
  • 3 weeks later...

it should be like this:

#RequireAdmin
#include <GuiListView.au3>

Run("C:\HelpOX\ProfWiz\Profwiz.exe")
ProcessWait("Profwiz.exe")
WinWaitActive("User Profile Wizard")
ControlClick("User Profile Wizard", "", "[ID:12324]")
Sleep(250)
ControlClick("User Profile Wizard", "", "[ID:12324]")
Sleep(250)
ControlListView("User Profile Wizard", "", "[CLASS:SysListView32;INSTANCE:1]", "SelectAll")
Sleep(250)
ControlListView("User Profile Wizard", "", "[CLASS:SysListView32;INSTANCE:1]", "Deselect", 2, 5)
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32;INSTANCE:1]", "GetText", 0, 0))
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32;INSTANCE:1]", "FindItem", "nicecube", 1))
Sleep(250)
MsgBox($MB_SYSTEMMODAL, "", ControlListView("User Profile Wizard", "", "[CLASS:SysListView32;INSTANCE:1]", "GetSelected", 1))

if it didn't work replace title (User Profile Wizard) with [CLASS:type here class of gui]-

ControlListView("[CLASS:text]","","[CLASS:SysListView32;INSTANCE:1]","SelectAll")

 

Edited by ad777

iam ِAutoit programmer.

best thing in life is to use your Brain to

Achieve

everything you want.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...