Search code examples
servicepsexec

Install windows service with PsExec?


Is it possible to remotely install a Windows system serive using PsExec? The files are already on the remote system; I am trying to use

psexec \\remote-host-name -u myusername -p mypassword PathToExecutable

where PathToExecutable is the path to some executable which is intended to install the service; somehow the service is not installed due to unclear reasons. Is remote installation via PsExec possible at all?


Solution

  • In my case, the issue was fixed by using the command line parameter:

    -h         If the target system is Vista or higher, has the process
               run with the account's elevated token, if available.
    

    to run the command with administrator permissions.