Search code examples
windowspsexec

psExec run file on shared folder (no C$ access)


I'm in the following scenario: my laptop is 20 miles away from a computer where I have a shared folder. I know the user/pass and I can login to this folder, where I see the files. So let's suppose this:

\\201.0.***.229\Moni

is the folder where I see the files. Ok, inside this folder I have a file called, Initializator.exe, and I want to run it on the remote computer (not on my laptop!), so I try:

psexec -i \\201.0.***.229\Moni Initializator.exe

and I get:

Couldn't access 201.0.***.229\Moni: The system cannot find the path specified.

if I try:

psexec -i \\201.0.***.229\Moni\Initializator.exe

psexec don't recognize my command and just show me it's banner with options. What I'm trying to do is possible?

PS: I have no permission to ADMIN$, C$ or anything else, only this shared folder.


Solution

  • I have no permission to ADMIN$, C$ or anything else, only this shared folder.

    Then you won't be able to use PsExec on that computer.

    From the author's article on PsExec (highlight in bold is mine):

    As with many of the tools in the PsTools suite, PsExec's ability to run processes remotely requires that both the local and remote computers have file and print sharing (i.e., the Workstation and Server services) enabled and that the default Admin$ share (a hidden share that maps to the \windows directory) is defined on the remote system.

    [...] PsExec starts an executable on a remote system [...] by extracting from its executable image an embedded Windows service named Psexesvc and copying it to the Admin$ share of the remote system. PsExec then uses the Windows Service Control Manager API, which has a remote interface, to start the Psexesvc service on the remote system.