Solved

PsExec command

Posted on 2013-11-12
1
1,067 Views
Last Modified: 2013-11-12
I have a network shared folder on Server1 on which I have placed SP1 for Win7 (windows6.1-KB976932-X64.exe) and batch File SP1.bat
SP1.bat  -  robocopy "\\30SWL-Server-02\SP1\windows6.1-KB976932-X64.exe" "C:\Temp"

On my Windows 7 PC,I have created pclist.txt file and placed it in the root of C (C:)
pclist.txt has name of computer (later I wanted to add PC names to it as needed)

I have user account which is a member of Domain Admin group

I opened cmd under that account and typed following command:

psexec @C:\pclist.txt –u domainname\username –p Password "\\30SWL-Server-02\SP1\SP1.bat"

The result in cmd:

C:\Windows\system32>psexec @C:\pclist.txt -u domainname\username -p Password "\\30SWL-GHOST-02\SP1\SP1.bat"

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

\\PCNAME:

PsExec could not start ?u on PCNAME:
The system cannot find the file specified.
0
Comment
Question by:vadimmikhal
1 Comment
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 39641672
I suspect that you created the batch file not in a plain editor like Notepad, but in a word processor that replaced the "-" with a dash or something else.
Open the file in Notepad, and make sure that every "-" is actually a minus sign.
While you're at it, make sure that all quote signs you use are real double quotes as well, not "pretty" ones.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

776 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