Running programm in elevated mode not working

BatchPatch Forums Home Forums BatchPatch Support Forum Running programm in elevated mode not working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8864
    marka17
    Participant

    I would like to execute a remote program via BP that needs elevation.

    On the console logged in as domain admin that works with psexec when I pass the domain admin account:

    psexec \computer -u domainAdministrator -p XXXXX -h cmd /c \serverprogramupdate.exe silent update

    I can also execute a local cmd script which contains the line:

    \serverprogramupdate.exe silent update

    psexec \computer -u domainAdministrator -p XXXXX -h cmd.exe /c "C:Program Filesupdate.cmd“

    which works also fine.

    But if I run psexec without -u domainAdministrator -p XXXXX at the command shell I get „Access denied“ error code 1

    The same is when deploying the cmd script with BatchPatch. The Remote Execution Context is changed to Elevated token. In the log I can see:

    Di-08:02:13> Remote Command: Exit Code: 1

    Di-08:01:52> Remote Command: Executing \computer -h cmd.exe /c “c:Program FilesBatchPatchdeploymenttempupdate.cmd”

    Di-08:01:52> Remote Command: Establishing connection…

    Di-08:01:52> Remote Command: Queued…

    The script is successfully deployed to the deployment directory of the remote computer. But still I get exit code 1.

    The same when I use Remote Process User defined command:

    cmd.exe /c "c:Program FilesBatchPatchdeploymenttempRunMegaReplace.cmd"

    My windows login account that runs BatchPatch is the Domain Admin. The -h switch seems not enough.

    How can I run this task in BP. I can’t find a way to pass the -u -p switch for psexec.

    Mark

    #10195
    doug
    Moderator

    To specify -u and -p you must use ‘Actions > Specify alternate logon credentials’. Then when the command is run it will use -u and -p.

    -Doug

    #10209
    marka17
    Participant

    Thank you. That was exactly what I was looking for.

    Mark

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.