Solved

Psexec copy file question

Posted on 2010-08-19
3
803 Views
Last Modified: 2012-05-10
EE,

I'm trying to run NLTest on workstations remotely via psexec, only NLTest is not installed on workstations. Instead of manually copying it I wanted to copy it using the -c in psexec and then run the command but so far it doesn't work for me.

psexec -c nltest.exe C:\WINDOWS\System32 \\RemoteIP cmd /k nltest /dsgetsite

This exits psexec every time. I swaped -c to the end and some other changes with no luck.

Any ideas?
0
Comment
Question by:snyderkv
3 Comments
 
LVL 26

Accepted Solution

by:
pony10us earned 250 total points
ID: 33477266
From:   http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

This command copies the program test.exe to the remote system (\\marklap) and executes it interactively:

psexec \\marklap -c test.exe

I
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 250 total points
ID: 33477729
The -c has no parameter, it is used as a simple switch indicating the program to start needs to be copied first. The correct usage is hence


psexec  \\RemoteIP -c nltest.exe /dsgetsite
0
 

Author Comment

by:snyderkv
ID: 33482266
Ah I see. Thanks both of you
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now