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.
LVL 1
AIT-GroupAsked:
Who is Participating?
 
RobSampsonConnect With a Mentor Commented:
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.

Regards,

Rob.,
0
 
Adam LeinssConnect With a Mentor Commented:
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
 
0
 
AmazingTechCommented:
So psexec works but you just can't copy?

Something like this command works?

psexec \\<comp-name> -U <username> ipconfig /all
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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.
0
 
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!
0
 
RobSampsonCommented:
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.

Regards,

Rob.
0
All Courses

From novice to tech pro — start learning today.