Pstools Psexec Error Code 1
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About
Pstools Psexec Examples
Us Learn more about Stack Overflow the company Business Learn more about hiring psexec exited with error code 1 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join psexec error code 0 the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up psexec exited with error code
What Is Psexec Error Code 1
1 - double quotes up vote 2 down vote favorite 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% batch-file command-line command-line-arguments command-prompt psexec share|improve
Psexec Error Code 1 Access Denied
this question edited Jul 23 '14 at 8:50 asked Jul 23 '14 at 8:33 RawFocus 4,151134585 The third execution was just a demo. The point is that the first two give different results depending on whether the parameter is quoted (see blue arrows). Still - it IS the same batch! –RawFocus Jul 23 '14 at 11:15 2 Sorry, you are right. I was reading where i shouldn't. –MC ND Jul 23 '14 at 11:33 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted psexec -u user -p pass cmd /c "d:\GitRepos\runAll.bat a1 a2 "a3"" share|improve this answer answered Jul 23 '14 at 11:39 MC ND 43.1k32144 Just what I needed! Thanks! –RawFocus Jul 23 '14 at 11:43 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged batc
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies psexec error codes of this site About Us Learn more about Stack Overflow the company
Cmd Exited With Error Code
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges cmd exited with error code 1 psexec Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a http://stackoverflow.com/questions/24905546/psexec-exited-with-error-code-1-double-quotes minute: Sign up Jenkins/Psexec - Error code 1 when I try to run a batch file on a virtual machine up vote 0 down vote favorite "C:\Temp\PsTools\PsExec.exe" -accepteula -i \\ukvc-miu29-12 -u Domain\Username -p Password "C:\Testing1\testing.bat" The above code is what is entered into Jenkins: Build -> Execute Windows batch command section. `C:\Testing1\testing.bat exited on ukvc-miu29-12 with error code 1. C:\Program Files (x86)\Jenkins\jobs\Run http://stackoverflow.com/questions/24551800/jenkins-psexec-error-code-1-when-i-try-to-run-a-batch-file-on-a-virtual-machin comparison script\workspace>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE` Basically trying to access the batch file on my virtual machine using Psexec tool and to run it there itself. Any help is appreciated and will respond quickly to any suggestions, thanks! batch-file jenkins psexec share|improve this question edited Jul 3 '14 at 11:26 asked Jul 3 '14 at 10:55 slizorn 6528 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted I am not familiar with the -i argument there but I think you are missing the -W argument here- Try this: "C:\Temp\PsTools\PsExec -u USERNAME -p PASSWORD -w "C:\Testing1\testing.bat" Also you might find this link useful : http://ss64.com/nt/psexec.html share|improve this answer answered Jul 5 '14 at 20:14 AltF4_ 79121541 Tried that, still getting an error 1, I cannot figure out why :( –slizorn Jul 9 '14 at 7:43 1 :( - sorry i wish i could help you - but a code 1 is return code becuase your psexec failed - so i would try just running that script fro
account only takes a few minutes. Join Now I've been trying to capture screenshots of remote machines (across a MPLS tunnel) to determine https://community.spiceworks.com/topic/468800-psexec-issue-cmd-exited-on-remote-pc-with-error-code-0 if a certain issue has been resolved without interrupting the user. I'm https://batchpatch.com/forum/topic/bat-files-error-code-1 using PSExec (SysInternals PSTools) with NirCMD.exe to attempt to get screenshots. Here's the command: psexec.exe \\192.168.1.7 -u "mydomain\administrator" -i -c nircmd.exe savescreenshot "c:\shot.png" When I try it I get "CMD exited on (remote PC) with error code 0." I also get this error when I simply login to the remote PC in the CMD error code prompt, then logout with this command: psexec.exe \\192.168.1.10 -u "mydomain\administrator" -p "password" cmdI've noticed that RPC fails on my first attempt frequently, but then works, so I've brushed it off, but maybe that is the issue here. Lastly, I found the commands on this site: http://rawtechnology.blogspot.com/2012/11/take-screenshot-of-remote-computer-with.html?showComment=1... Reply Subscribe View Best Answer RELATED TOPICS: PSExec returning Error code 0 but not working PSEXEC: ipconfig exited with error code 1 Error code psexec error code 403: Usage Level Exceeded   4 Replies Jalapeno OP Helpful Post (root) Apr 3, 2014 at 5:10 UTC error code 0 = SUCCESS! 2 Thai Pepper OP Best Answer Matt9169 Apr 3, 2014 at 5:29 UTC as (root) said, it means success. However I have found that sometimes I have to put the command ie: "nircmd.exe savescreenshot "c:\shot.png"" into a .bat file, copy the file to the remote drive, and then run it from there. It is also important to note that the shot.png file will be saved on the remote c: drive. Lastly, be sure that the user which you are using has permission to write directly to c:\, you might have to use a lower directory. 1 Thai Pepper OP CrimsonKidA Apr 3, 2014 at 5:50 UTC (root) wrote: error code 0 = SUCCESS!Gotcha. It's one of those "Error: there is no error" messages. Haha 0 Thai Pepper OP CrimsonKidA Apr 3, 2014 at 5:53 UTC Matt9169 wrote: as (root) said, it means success. However I have found that sometimes I have to put the command
voices) Started 3 years ago by veix Latest reply from doug veix Member In older versions it was possible to execute \\networkshare\somebatfile.bat as "Remote script/process (psexec). Now "Error Code:1" is received. Commands in BAT file executed as separate custom PsExec command 1&2 works. Executing BAT file from PSExec works. I am using BatchPatch version 2012.12.10 and psexec version 1.92. Website needs version info on downlads page too... Great product. Posted 3 years ago # doug doug Hi veix - 1. You'll need to specify alternate credentials for this work. This is because when you connect to the target computer with integrated security, the target computer then tries to connect to a different network location but doesn't have network access because it's impersonating. So, if you specify alternate credentials, those credentials are first passed to the target system where they can be used natively without impersonating, and in that case they will have access to the network share. 2. To PsExec a .bat file from the command line you'd have to do the following: psexec \\targetServer -u domain\username -p password cmd.exe /C "\\networkshare\somebatfile.bat" To do the equivalent in BatchPatch, enter the following into the "Remote script/process" window: cmd.exe /C "\\networkshare\somebatfile.bat" Alternatively you could actually use the "Patch Deployment" feature in BatchPatch to do this. Just specify the .bat file as your "Installer file" in the "Patch Deployment" window, and then BatchPatch will take care of the rest. In this case you would not have to use alternate credentials because BatchPatch will actually copy the .bat file directly to the target machine and execute it there. I hope this helps. -Doug Posted 3 years ago # veix Member Hello, Thank you for reply. 1. Isn't alternate credentials a bad thing, since PSExec sends credentials over network as plain text?! 2. No. With psexec it works as psexec -s \\targetserver \\networksshare\somebatfile.bat My user just has to have administrative permissions on targetserver and read access to \\networkshahe. If I use Remote script/process then no output is read from nowhere and BAT is not executed. And everything was working on older versions... I would dig out some older version, but newer ones has this neat feature where you could browse com