Solved

Psexec copy file question

Posted on 2010-08-19
3
819 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 70

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

691 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