blackey Posted March 2, 2007 Share Posted March 2, 2007 I am currently researching sending a file from one computer to another and executing it on the remote PC. i know PSEXEC is a tool that would be used in this scenario, but the remote PC doesn't have the Admin share enabled. I know i could easily enable the Admin share but the bottom line is I'm looking for a different way to send and execute a file to a remote PC. I was looking at the help file and saw some interesting functions with regard to TCP/UDP transfer from one computer to another, but it looks like only text is transferred. Anyone know of a way to achieve this? I know the remote PC has some open ports but I'm not sure how to take advantage of this. I appreciate your guys' help! Link to comment Share on other sites More sharing options...
PaulIA Posted March 2, 2007 Share Posted March 2, 2007 I am currently researching sending a file from one computer to another and executing it on the remote PC. i know PSEXEC is a tool that would be used in this scenario, but the remote PC doesn't have the Admin share enabled. I know i could easily enable the Admin share but the bottom line is I'm looking for a different way to send and execute a file to a remote PC. I was looking at the help file and saw some interesting functions with regard to TCP/UDP transfer from one computer to another, but it looks like only text is transferred. Anyone know of a way to achieve this? I know the remote PC has some open ports but I'm not sure how to take advantage of this. I appreciate your guys' help!There are a lot of ways to do this and I'm sure people will chime in, but you might want to consider using pipes. There is a client/server pipe demo in Auto3Lib (see my signature) that is used to execute commands on a remote machine. With minimal coding, it could be enhanced to allow file transfers as well. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
blackey Posted March 2, 2007 Author Share Posted March 2, 2007 There are a lot of ways to do this and I'm sure people will chime in, but you might want to consider using pipes. There is a client/server pipe demo in Auto3Lib (see my signature) that is used to execute commands on a remote machine. With minimal coding, it could be enhanced to allow file transfers as well.I have installed all of the Auto3Lib files into my include folder and i am looking at the pipe examples provided but seems a bit confusing so far. Any way i can get some specific help in sending a file from computer A to computer B then executing it? Thanks again. we seem to be on the right track! Link to comment Share on other sites More sharing options...
blackey Posted March 2, 2007 Author Share Posted March 2, 2007 Also i may have failed to mention that i want to be able to do this without making any modifications to the remote PC. Ideally i would like to have one main server PC which would be on a LAN with say 10 other remote PC's, and i would like to be able to find the other 10 PC's from the server and send out an exe file to each remote pc and have it execute. Link to comment Share on other sites More sharing options...
PaulIA Posted March 2, 2007 Share Posted March 2, 2007 Also i may have failed to mention that i want to be able to do this without making any modifications to the remote PC. Ideally i would like to have one main server PC which would be on a LAN with say 10 other remote PC's, and i would like to be able to find the other 10 PC's from the server and send out an exe file to each remote pc and have it execute.Probably no use using the pipes module then as it requires the remote piece to be installed on the client machines. There is a way to do this without user intervention, but if you don't have Admin rights, you're probably out of luck with any solution. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
blackey Posted March 2, 2007 Author Share Posted March 2, 2007 Well i have the Admin credentials for the remote PC, the only issue is the process of transferring an executable from the server computer to the remote PC and running it. ideas? Link to comment Share on other sites More sharing options...
PaulIA Posted March 2, 2007 Share Posted March 2, 2007 Well i have the Admin credentials for the remote PC, the only issue is the process of transferring an executable from the server computer to the remote PC and running it.ideas?If you want to transfer a file to a remote PC, you either have to have a program on the PC to talk to or you need a share you can copy the program to. If you don't have access to the Admin share and can't create an "Admin only" type share, I do not know of any way to transfer a file to it. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
blackey Posted March 2, 2007 Author Share Posted March 2, 2007 If you want to transfer a file to a remote PC, you either have to have a program on the PC to talk to or you need a share you can copy the program to. If you don't have access to the Admin share and can't create an "Admin only" type share, I do not know of any way to transfer a file to it.Appreciate your input, this is a pretty important task i just wanted to make sure there's not a little trick i don't know about. Thanks! Link to comment Share on other sites More sharing options...
Fabry Posted June 21, 2007 Share Posted June 21, 2007 I know that I'm late. I have the solution, also me I would transfer the file. I used for a chat. I mix TCP and UDP, but transfer is in tcp. sending: CODE $file_TX = FileOpenDialog('Scegli File da inviare', @WorkingDir & '\', 'Qualsiasi (*.*)', 3) If FileGetSize($file_TX) <= 167700000 And $file_TX <> '' Then $nomfile = StringSplit($file_TX, '\') $socket1 = UDPOpen($ips[1][$i], 65532) UDPSend($socket1, $nomfile[$nomfile[0]] & 'รธ' & FileGetSize($file_TX)) UDPCloseSocket($socket1) Else MsgBox(48 + 8192, 'Attenzione', 'File troppo grande o inesistente') EndIf $file1 = FileOpen($file_TX, 16) $file_dati = FileRead($file1) FileClose($file1) $socket1 = 0 Do $socket1 = TCPConnect($ip, 65531) Until $socket1 <> 0 Sleep(1000) TCPSend($socket1, $file_dati) receiving: CODE $file_pro = StringSplit($data, 'รธ');FileNameรธSize MsgBox(52 + 8192, 'Trasferimento file', 'sta inviando il seguente file: ' & @CRLF & 'Nome file: ' & $file_pro[1] & @CRLF & 'Dimensione: ' & Int($file_pro[2] / 1024) & ' KB' & @CRLF & 'Si desidera accettare?') $nomfile = StringSplit($file_pro[1], '.') $est = $nomfile[$nomfile[0]] $file_RX = FileSaveDialog('Ricevi file', @WorkingDir & '\', 'Qualsiasi (*.' & $est & ')', -1, $nomfile[1]) _FileCreate($file_RX & '.' & $est) $file1 = FileOpen($file_RX & '.' & $est, 18) $connectedSocket = TCPAccept($socketTCP) If $connectedSocket > 0 Then ProgressOn('Trasferimento file', 'Inizio del trasferimento', '', -1, -1, 16) $a = 0 While $a < $file_pro[2] $dataTCP = TCPRecv($connectedSocket, 1677000) FileWrite($file1, $dataTCP) $a = BinaryLen ($dataTCP) + $a ProgressSet(Int(($a * 100) / $file_pro[2]), 'Trasferito il ' & Int($a/ (1024)) & ' KB su ' & Int($file_pro[2]/ (1024)) & ' KB.', 'Trasferimento file in corso') $dataTCP = '' WEnd ProgressOff() FileClose($file1) TCPCloseSocket($connectedSocket) $connectedSocket = -1 $a = MsgBox(36, 'File completato', 'File completato con successo. Si desidera aprirlo?') If $a = 6 Then _RunDOS('"' & $file_RX & '.' & $est & '"') EndIf You must improv A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza รจ il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Link to comment Share on other sites More sharing options...
PaulIA Posted June 22, 2007 Share Posted June 22, 2007 I know that I'm late.I have the solution, also me I would transfer the file.I used for a chat.I mix TCP and UDP, but transfer is in tcp.sending:You must improvThat's not what the OP asked for. He wanted to be able to transfer a file to the client without installing anything on the client PC. You'd have to install one of your scripts on the client PC just for this to work. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Fabry Posted June 22, 2007 Share Posted June 22, 2007 That's not what the OP asked for. He wanted to be able to transfer a file to the client without installing anything on the client PC. You'd have to install one of your scripts on the client PC just for this to work.Sorry, I didn't understand, you have reason. A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza รจ il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Link to comment Share on other sites More sharing options...
NajibK Posted June 3, 2011 Share Posted June 3, 2011 i need a script to send the sentence "Lights ON" to a remote machine on the same network with a x.x.x.x ip address .. can anyone help me .. thank you 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