Problems copying files with PsExec

I've been having trouble copying files from my computer to other computers using PsExec.

- I've tried using the "-u" parameter along with my username, but when I try to run the command it says that access is denied. I've verified that the user account has admin rights on that computer (it has admin rights on both computers). I've even shared the origin folder. Here's an example of my command:

psexec \\<comp-name> -U <username> -C -f C:\st\java\jre\jre618.msi

- Another variation I've tried is the following:

psexec \\comp-jchambers -S -C -f C:\st\java\jre\jre618.msi

I used the "-S" parameter with the hopes of bypassing the user restrictions I encountered previously. This time, however, I get the error that states that "The system cannot find the file specified".

I've tried both variations of the command pointing to the .msi's folder rather than to the installer itself with no luck. There's got to be something simple I'm missing, but I'm at a mental block. Any advice would be much appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Adam LeinssServer SpecialistCommented:
From my remember, the -c option actually copies the file into the C:\windows\system32 directory on the target PC.
It would be better to copy the file to a server share, then you could do this:
psexec -s \\targetpc \\someserver\somewhere\jre618.msi
So psexec works but you just can't copy?

Something like this command works?

psexec \\<comp-name> -U <username> ipconfig /all
AIT-GroupAuthor Commented:
It works fine and I can actually run another .msi from it. I like the idea of running it from a shared location though. That might make my job easier. I'll follow up after I test it out.
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Hi, you should be able to use the following:
psexec -accepteula -e -u <domain\user> -p <password> \\comp-jchambers msiexec \\server\share\st\java\jre\jre618.msi

I usually put the computer name parameter at the end, just before the command to execute.  This has sometimes made a difference.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AIT-GroupAuthor Commented:
Hey guys,

Thanks for the help. I think what did it for me was moving it to the shared folder. From there I could run the installer with msiexec without having to do any copying.

Thanks again for the help!
When you said you had share the origin folder, I thought you meant you had tried to run it from there, like I did above.  Anyway, glad it works now, thanks for the grade.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.