Sign in to follow this  
Followers 0
Billd59

pstools copy from remote computer to local computer

5 posts in this topic

I want to redirect a batch file from the remote computer I connect throw with Psexec to my local computer? I am a home user. What I am planing to do Is ipconfig on the remoter computer and make a batch file to be save on the local computer. I know on the remote computer you do cmd ipconfig > than than batch file to be saved. for exple iIf the file Is test you would do: config >test.bat

Share this post


Link to post
Share on other sites



Hi, Billd59, welcome to the forum. Unfortunately, your explanation leaves a bit to be desired. If you're looking for a way to do an IPConfig and save it to a batch file (why not text??), so you can then run it on a remote machine with PSExec, you can do something like this:

RunWait( @ComSpec & ' /k ipconfig>Test.bat', "", @SW_HIDE )

You would then run the command through PSExec, copying the AutoIt script to the remote machine before executing.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Use WMI to get the IP information from the remote computer.

Using PSExec is too complicated here but possible!

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

this works for me, but you will have to parse the file to get the ip

PsExec.exe [url="file://computername"]computername[/url] ipconfig > C:test.txt

Runs ipconfig on the remote station, and writes the output locally

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Try this:

$source = @IPAddress1
$dest = "hostname"
$psexec  = "path to psexec.exe "
$psexec_param = "" & $dest & " ipconfig /all > " & $source & "c$tempipconfig_" & $dest & ".txt"
$pid = RunWait($psexec & $psexec_param, @ScriptDir, @SW_HIDE)

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


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
Sign in to follow this  
Followers 0