Psexec Error Code -2146232576

0

I'm trying to open up a an .exe program that is on a remote computer through my main desktop using a batch file and psexec.exe.

I have been able to remotely kill programs using pskill, but when I run the command line required to open a program the window opens up for a fraction of a second before closing down due to an error. The error code it gives is: -2146232576.

I've tried Googling what this error actually is but I can't find much. Does anyone know for sure what this error relates to?

This is the batch file I made that does not work:

cd c:\Users\[local user]\Downloads\PSTools\
psexec.exe \\computername -u [user] -p [password] "C:\Users\[user]\Desktop\SQAUtilities\utlity.exe"

Note: I found a question on StackOverflow which is similar, but has a different error code:

psexec error code -1073740771

And also:

Error code 1073741502 when running psexec through TeamCity

This one has an answer that says the error is "a low-level .NET initialization error, the CLR cannot get loaded":

visual studio 2010: error code -2146232576 (0x80131700)

batch-file
command-line
remote-access
psexec
error-code
asked on Stack Overflow Nov 3, 2014 by Benjulious • edited May 23, 2017 by Community

3 Answers

1

This is likely the exit code of utility.exe that PSExec is passing back to you, not an error generated by PSExec.

Here's one possible source: FIX: 0x80131700 error code when starting or configuring the Enterprise Single Sign-On Service

I don't know what utility.exe does, but if it attempts to perform Windows authentication, PSExec might be blocking it. In my experience, PSExec deliberately blocks some actions (under certain circumstances). For example, if you don't use a username/password, all attempts to access remote shares fails instantly. Since you're providing some creds, this might not be the precise problem, but if utility.exe requires access to your Kerberos tickets or something, they might not be accessible in a PSExec session.

Things to Try

  • Do you know that this command (utility.exe) works on the remote machines as your user when run interactively (GUI logon)? Surely you've already tried that, but just to make sure...
  • Is the build directory on the remote computer or is it a share on a third machine? The method of accessing those files might require more steps within PSExec (like mapping a drive, etc.).
  • If the program absolutely requires a GUI, you may have to allow it to interact with a specific GUI session using the -i parameter of PSExec. You might try logging into the remote machine, running the command with -i 2 (or whatever session qwinsta tells you you're using—2 is common for remote desktop connections) and see if it opens any error dialogs that are more informative.
  • You might try running ProcMon on the remote machine while you run the PSExec command and seeing if there are any ACCESS_DENIED or other failures that it notices.
answered on Stack Overflow Nov 3, 2014 by mojo • edited Nov 3, 2014 by mojo
1

Got the same error while remotely running an EXE install file (not copying it local). As near as I can tell this is an error related to insufficient permissions. For me, the simple addition of the -S switch (to run as SYSTEM) fixed my problem.

Why this works I'm not sure - I'd always thought SYSTEM was strictly limited to local resources, yet the EXE I'm running is located on a network share.

Hope this helps someone.

answered on Stack Overflow Mar 19, 2017 by Xeiran
0

I got the same error lately and found out why I get this. You must make a local copy of "utility.exe" on the remote computer for before launching it via PsExec.

    for /f "usebackq delims=" %%i in ("d:\utility\remote_computers.txt") do (
    xcopy "D:\utility\utility.exe" "\\%%i\d$\" && psexec \\%%i -u %%i\administrator -p password cmd /c "/i \\%%i\d$\utility.exe"
)
Pause
answered on Stack Overflow Nov 28, 2019 by Marco

User contributions licensed under CC BY-SA 3.0