thebman Posted September 5, 2008 Share Posted September 5, 2008 (edited) I'm trying to find a way using AutoIt to Create/Transfer a user's profile from Machine A to Machine B over the network. Both machines are on the same domain. I already have a script to transfer the user directories across the network. Currently I have to get the user's password and log in as the user on the new machine first to create the profile/user account. Then I run my script from the source machine to transfer the user directories to the target machine. I'm trying to avoid having to ask the user for their password and then having to log in as them. I want one script that when run from the source machine will 1) Let me select the user profile I want to transfer from a list of all profiles on the source machine 2) Create the user account on the target machine 3) Copy over the user directories to the target machine I don't mind using extra programs if needed, but I want this as scripted as possible with minimal user input. Edited September 8, 2008 by thebman Link to comment Share on other sites More sharing options...
dburner Posted September 5, 2008 Share Posted September 5, 2008 Im not sure if I understand what you mean but if you are trying to make a login function thats simple. When you have a new connection on the server just make a while and wait for the client to send the account and the password. Client $con = TCPConnect($ip, $port) TCPSend($con, $acc & Chr(1) & $password) While 1 $recv = TCPRecv($con, 1024) If $recv <> "" Then if $recv = "ok" then ExitLoop if $recv = "tryagain" then Exit EndIf WEnd Server $newConnection = TCPAccept($MainSocket) If $newConnection <> -1 Then $timer = TimerInit();make a timer to avoid server crash by entering an infinite loop While TimerDiff($timer)<1000 and $recv = "" $recv = TCPRecv($newConnection, 100) If @error then $recv = -1 ExitLoop EndIf If $recv <> "" Then $credidentials = StringSplit($recv, Chr(1)) Verify the credidentials if they match then send the clinet ok if they dont send tryagain EndIf WEnd EndIf I hope this helps. Link to comment Share on other sites More sharing options...
thebman Posted September 8, 2008 Author Share Posted September 8, 2008 (edited) I can't run any programs on the server. This all has to be ran from the client. This is not really a login script, its a profile transfer script. Only issue is I can't transfer the users directories;(My Documents, Favorites, Desktop, Network Printers Registry Keys, etc.) without their profile being in place on the Target machine. Currently I have to login as the user first on the target machine to create the users profile (My Documents folder, etc........), then I can run my script to transfer the users directories and registry values. There is a piece of software that I use sometimes called PC Transplant it is able to transfer the users profile from Machine A to Machine B without any need to login as the user on the target machine first. I'm trying to emulate this function in my Autoit script. Edited September 8, 2008 by thebman Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now