psexec

Error code 1073741502 when running psexec through TeamCity

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 01:31:01
问题 I have a build step that needs to run a console application under a different (more privileged) user account. However PsExec always returns with the exit code -1073741502. I thought the issue was from my app but when I replace with the following it still fails: PsExec.exe -accepteula -u Username -p Password "cmd.exe" /C Or PsExec.exe -i -accepteula -u Username -p Password "cmd.exe" /C Note that TeamCity build agent runs under a user account created specifically for it. When I manually log in

Using PsExec in a Windows Service

前提是你 提交于 2019-12-13 00:49:14
问题 I have created a Windows Service using C# which performs variance network maintenance tasks for me. One of the tasks is defraging machines remotely and for some of my older boxes I found the only way to do this was using psexec with defrag.exe. The code works fine when I simply run my C# code, however when I covert it into a Windows Service it does the defraging using the Win32_Volume table fine but it seems to get hung up when attempting to use PsExec to defrag the XP machines. I guess my

Using PsExec with spawning a child process results in truncated stdout

孤街浪徒 提交于 2019-12-12 20:25:57
问题 My goal is to be able to execute a command on a remote machine and get the full stdout response from the command that was run. What I am getting is a truncated result. When I run the same command through command prompt, I get the full output from the command run. Here is my code: var process = spawn('PsExec.exe', ['\\\\servername', 'ipconfig']); var doOnce = true; process.stdout.on('data', function (data) { log.info('stdout: ' + data.toString()); if(doOnce){ doOnce = false; process.stdin

Robocopy to copy files to a remote machine

若如初见. 提交于 2019-12-12 11:47:54
问题 I'm trying to write a robocopy command to copy files from my local computer to any one of my deployment servers ROBOCOPY ../../MyService/bin/release/ \\remote-computer\\C:\services\myservice /MIR and I get this error The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you. This is expected as I haven't included any sort of security credentials in the command. Is there a way to get this to work by including permissions

psexec error code -1073740771

℡╲_俬逩灬. 提交于 2019-12-11 19:14:18
问题 I'm trying to open up a Unity3D game.exe that is on a remote computer through my main desktop. I had tried to do this through a batch file, but was advised to try PsExec in its place. So far, I've brought the Psexec program into my game.exe folder. I run the command line required to open the program and the window opens up for a fraction of a second before closing down due to an error. The error code it gives is: -1073740771. I tried googling what this error actually is but I can't find

Session ID in PSExec

孤者浪人 提交于 2019-12-11 13:11:09
问题 Psexec fails to display a notepad GUI on the remote session for me. So, I am trying to get the session id as below: c:\Users\Amitra\Downloads\PSTools>PsExec -u administrator -p force \\135.20.230.160 query session PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark Russinovich Sysinternals - www.sysinternals.com SESSIONNAME USERNAME ID STATE TYPE DEVICE >services 0 Disc rdp-tcp#0 Administrator 1 Active rdpwd console 4 Conn rdp-tcp 65536 Listen query exited on 135.20.230.160

.NET console output and PSExec

五迷三道 提交于 2019-12-11 11:41:12
问题 I'm running PSExec Microsoft tool with Process class executing a remote command with its own output like this: Process p = new Process(); string args = @"\\remotemachine -u someuser -p somepass wmic product get name"; ProcessStartInfo ps = new ProcessStartInfo(); ps.Arguments = args; ps.FileName = psExecFileName; ps.UseShellExecute = false; ps.CreateNoWindow = true; ps.RedirectStandardOutput = true; ps.RedirectStandardError = true; p.StartInfo = ps; p.Start(); StreamReader output = p

PHP not reading psexec output

為{幸葍}努か 提交于 2019-12-11 08:20:31
问题 The problem is simple. Running a php file in browser vs command line produces very different results and I can't for the life of me figure out why. Any php/psexec experts out there run into this before? <?php echo '<pre>'; $output = shell_exec("psexec -accepteula \\\mypcname -u mypcname\\accountname -p xxxxxxx ipconfig /all 2>&1"); var_dump($output); echo '</pre>'; Produces this output in a browser window... string(350) " PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark

psexec exited with error code 1 - double quotes

醉酒当歌 提交于 2019-12-11 01:25:36
问题 Why does the psexec-executed command below fail when I add double quotes to the parameter? It works fine without psexec with double quotes It works fine with psexec without double quotes! The contents of the .bat file are as follows: set FILEPATH=%~1 set BAT_ARCHIVE_IDENTIFIER=%~2 set DEPLOYMENT_ROOT=%~3 echo %FILEPATH% %BAT_ARCHIVE_IDENTIFIER% %DEPLOYMENT_ROOT% 回答1: psexec -u user -p pass cmd /c "d:\GitRepos\runAll.bat a1 a2 "a3"" 来源: https://stackoverflow.com/questions/24905546/psexec

Executing a batch file in a remote machine through PsExec

旧街凉风 提交于 2019-12-09 06:46:05
问题 I am trying to run a batch file (in the batch file I have just written 'notepad') on a remote PC through PSExec. The psexec command below runs in my laptop but fails to do anything on the remote PC. I don't even see 'notepad' running on the list of processes in the remote machine. c:\Program Files (x86)\PSTools>psexec -u administrator -p force \\135.20.230.160 -s -d cmd.exe /c -c "C:\Amtra\bogus.bat" PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark Russinovich