Home > Error Code > Psexec Exe Error Code 1

Psexec Exe Error Code 1

Contents

It takes about 20 seconds to run. Browse other questions tagged c# psexec or ask your own question. Prove sets equality. HOWEVER, as I suggested in the previous posting, you can use BatchPatch's "Patch Deployment" feature, which will do exactly what you want and will NOT require alternate credentials. this contact form

Now I am getting one more issue that sometimes PSEXEC hangs the TFSBuild. Setting the ERRORLEVEL has no effect. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed College Wide Backup System Test multiple backup solutions, choose and then implement the best one. http://forum.sysinternals.com/error-code-1-when-using-psexec_topic23617.html

Psexec Error Code 1 Access Denied

c# psexec share|improve this question edited Jul 25 '14 at 11:26 Storm 634920 asked Jul 25 '14 at 10:26 user1773682 194 add a comment| 1 Answer 1 active oldest votes up Since the folder resides at Z:\folder1\folder2\execute.bat the following should be understood about the Z drive. Example: exit /b -2 Explanation: exits the batch file, closes the cmd.exe, and sets the return code to zero I write my batch files with GOTO statements that control the exit Not the answer you're looking for?

  1. Wednesday, April 06, 2011 9:26 AM Reply | Quote Moderator 0 Sign in to vote HI Vicky, Thanx for the reply.
  2. It's one of those "Error: there is no error" messages.
  3. All that said, the BatchPatch code has not changed for the "remote script process" functionality, so I'm unsure how you would have had anything different work in an older version of
  4. Starting c:\test\PlatformBuildDeploy.cmd on BR811920...
  5. I am getting an error code -1.
  6. Edited by Wake0psid Monday, June 06, 2011 9:24 AM missing keyword Monday, June 06, 2011 9:24 AM Reply | Quote Microsoft is conducting an online survey to understand your opinion of
  7. I hope this helps. -Doug Posted 3 years ago # veix Member Thank you for long explanation, and it did help (if you said you have not changed the code).

Z:\ = \\FS1\LocalDrive$\data\apps Z:\ = \\domain\folder3\apps With that said, one could execute the file by browsing to: Z:\folder1\folder2\execute.bat \\FS1\LocalDrive$\data\apps\folder1\folder2\execute.bat \\domain\folder3\apps\folder1\folder2\execute.bat From WS1 I have tried using the following syntax from CMD: 1. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? The point is that the first two give different results depending on whether the parameter is quoted (see blue arrows). Cmd Exited With Error Code 0 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

Privacy statement  © 2016 Microsoft. 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 This means that using alternate credentials in BatchPatch is no less secure than using integrated security. -Doug Posted 2 years ago # RSS feed for this topic Reply You must log http://stackoverflow.com/questions/24551800/jenkins-psexec-error-code-1-when-i-try-to-run-a-batch-file-on-a-virtual-machin Does the code terminate?

Once you use the exits, you're finally inside me Set literal gives different result from set function call Should two DFAs be complete before making an intersection of them? Pstools Exited With Error Code 1 Why don't cameras offer more than 3 colour channels? (Or do they?) Font identification dificulties Which lane to enter on this roundabout? (UK) Non payment on (Phone) Handset Lease more hot 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. What's concerning is that when I run the batch file via the cmd, it populates my logs folder with a text file but doing so via Jenkins does not result in

Psexec Error Codes

Enter the password (enter) Once connected to the remote machine do this: cd z:\folder1\folder2 (enter) execute.bat (enter) BTW - if you run either of these with the /s switch (not a https://batchpatch.com/forum/topic/bat-files-error-code-1 Connecting with PsExec service on Myhost... Psexec Error Code 1 Access Denied Email Reset Password Cancel Need to recover your Spiceworks IT Desktop password? Cmd Exited With Error Code I hope this helps. -Doug Posted 3 years ago # veix Member Hello, Thank you for reply. 1.

But now I am getting the process ID of the executed batch file as return code. weblink Can anyone help me on this please. 2nd case: Command to execute on remote site Myhost : \\Myhost -u Username -p password "C:\Program Files\..\myapp.exe" -xml "C:\my Client\..\input.xml" Command output: PsExec v2.11 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 By creating an account, you're agreeing to our Terms of Use and our Privacy Policy Not a member? Cmd Exited With Error Code 1 Psexec

Additional questions please ask in the sysinternals forum.Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. What loves to talk but has little to say Human vs apes: What advantages do humans have over apes? Please take a look at this blog for detailed information how to use PSexec in the workflow. navigate here About Advertising Privacy Terms Help Sitemap × Join millions of IT pros like you Log in to Spiceworks Reset community password Agree to Terms of Service Connect with Or Sign up

TECHNOLOGY IN THIS DISCUSSION Join the Community! Psexec Exit Code -1 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. Not the answer you're looking for?

Additional you may ask in the sysinternal forum instead this one: http://forum.sysinternals.com/ Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers

I had also tried adding -accepteula...but the result was same. What is summer in Spanish? "Estío" vs "verano" A test of Survival Absolute value of polynomial Non payment on (Phone) Handset Lease Why do jet engines smoke? 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 Psexec Powershell Exited With Error Code 1 However, in a modern switched network environment, this is generally not necessarily all that big of a deal because the network traffic and clear text password will not be exposed to

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 Join them; it only takes a minute: Sign up Getting error code 1 while executing a command on remote machine in C# up vote 0 down vote favorite static void Main(string[] http://www.codewrecks.com/blog/index.php/2010/07/10/deploy-remotely-with-tfs-build/ In addition, please also take a look at this thread which discusses the PSexec hangs in the TFS. his comment is here You may get a better answer to your question by starting a new discussion.

Help Desk » Inventory » Monitor » Community » Home PSExec issue - "CMD exited on (remote PC) with error code 0." by CrimsonKidA on Apr 3, 2014 at 5:03 UTC adding echo at the start of my batch file just outputs the line of code in the batch file (jenkins doesn't seem to pick on it though). I have tried multiple domain accounts including the domain administrator.  I have also tried without using "domain\" before the user names. C:\Program Files\..\myapp.exe exited on Myhost with error code -1.