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 Here is what I have on the custom tools cmd /k "C:\Program Files\Hyena\Tools\psexec.exe" \\%E% \\Server\JOBS\WSUS.bat Thanks. Privacy statement © 2016 Microsoft. I'd suggest using Process Monitor for further exploration of the issues encountered on the remote system... http://caribtechsxm.com/error-code/psexec-error-code-0-batch-file.php
Why would breathing pure oxygen be a bad idea? The time now is 09:22 PM. James Ray Anderson James Ray Anderson Home About Programming Primer - Object Oriented Programming Exceptions (Error Handling) HTML 5 Entity Framework Model-View-Controller Concepts (MVC) jQuery User Groups in Austin Area Select To avoid this use the /b option on the exit command. http://stackoverflow.com/questions/24905546/psexec-exited-with-error-code-1-double-quotes
Below is the actual batch file. The following seems to have done the trick for me: "C:\Temp\PSTools\PsExec.exe" -accepteula \\ukvc-miu29-12 cmd /c "\\ukvc-miu29-12\c$\Jenkins\test.bat" However now, it appear that though it seems to have run successfully, nothing has happened. ToolNews Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders Advanced Search Forum General Discussions Custom Tools remote execution of batch file If It takes about 20 seconds to run.
Will investigate using the different options and see if adding any of them will make a difference. –slizorn Jul 9 '14 at 12:55 | show 1 more comment Your Answer Marked as answer by Yuan WangMicrosoft employee, Moderator Monday, July 11, 2011 1:37 PM Monday, June 06, 2011 9:08 AM Reply | Quote All replies 0 Sign in to vote Hello, Numeric constants are either decimal (17), Hot Network Questions Misuse of parentheses for multiplication How do I translate "hate speech"? Psexec Error Code 1 Access Denied Since the folder resides at Z:\folder1\folder2\execute.bat the following should be understood about the Z drive.
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 What Is Psexec Error Code 1 What's New? Browse other questions tagged batch-file command-line command-line-arguments command-prompt psexec or ask your own question. a fantastic read My goal is to make it easier for those who are starting out, for those who are facing a challenge, or for whomever wants to save time and just get the
Website needs version info on downlads page too... Psexec Cmd.exe Exited On With Error Code 1 Also running simsbac.bat on the server localy works fine so it't not the .bat file. Error can indicate a bug in the executed software that causes stack overflow, leading to abnormal termination of the software.3762507597
-532459699Unhandled exception in .NET application. asked 2 years ago viewed 4112 times active 2 years ago Blog Stack Overflow Podcast #92 - The Guerilla Guide to Interviewing Related 0Execute Mount commands via psexec window via batch
Posted 3 years ago # doug doug Hi veix - 1. Indicates that the file can not be found in specified location.3The system cannot find the path specified. Psexec Cmd Exited With Error Code 1 How to deal with client's delusion to be a good graphic designer Was the Oceanic flight 815 pilot the only one attacked by the monster? Psexec Error Codes I have tried the same code but connecting to another workstation which works fine, it's just when connecting to the server.
What do you call this kind of door lock? http://caribtechsxm.com/error-code/psexec-error-code-42.php Error code 0xc00000e9   2 Replies Thai Pepper OP J - 159 May 22, 2009 at 8:21 UTC It seems that PSexec is looking for execute.bat on the The firewall is off and I am using full admin rights to both the workstation and the server. Differentiation of sine in Fourier domain Can you move a levitating target 120 feet in a single action? Psexec Exited With Error Code 1
is there any specific chnages/permissions needed to be givenon Win 2008 Server Monday, June 06, 2011 9:05 AM Reply | Quote 0 Sign in to vote Hello, make sure that you Will have a check in the sysinternals forum. Last updated: April 02, 2015 navigate here This is expected behavior, due to how impersonation works.
I created a two-line file test.bat:echo This is a test.pauseWhen I went to the folder of this batch file and simply typed:psexec test.batThat works fine.I tried:psexec -u adminacct -p password test.batI Psexec Error Code 2 Email Reset Password Cancel Need to recover your Spiceworks IT Desktop password? Just performing an exit closes the batch file normally, but terminates the cmd.exe.
If I don't pass credentials and instead rely on integrated security, computer A can access computer B, but on computer B there is no network access to connect to computer C. This is an example of a batch file that reads a log file line-by-line and examines it for the success/failure string. Mathematics tenure-track committees: Mathjobs question Once you use the exits, you're finally inside me Cant find the game to this melody. Psexec Exit Code -1 keep in mind that it may not be available in the context of the PsExec command.
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. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.Would you like to participate? I have tried multiple domain accounts including the domain administrator. I have also tried without using "domain\" before the user names. his comment is here Privacy Statement Top All times are GMT -5.
Home Forum iSpy New Posts Today's Posts Calendar Community Groups Albums Member List Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders Blogs Wiki What's New? You may have to register before you can post: click the register link above to proceed. You will also notice that I left the password off of all options. Username Password Remember me Search: BatchPatch Forum » BatchPatch Support Forum BAT files Error code: 1 (7 posts) (2 voices) Started 3 years ago by veix Latest reply from doug veix
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). All rights reserved. Reply With Quote 04-03-2008,08:24 AM #3 miketg Guest Re: remote execution of batch file I am getting an access denied error with error code 1. I'm trying: Code: psexec \\servername simsbac.bat and im getting: Code: simsbac.bat exited on servername with error code 1.
I treidpsexec \\tw2k3svrinfo dtsrun /F "C:\DataWarehouse\ImportAdmitDisch.dts"on its own, and got error code 2, though on the local computer that runs fine. Indicates that the application has been terminated either by user's keyboard input CTRL+C or CTRL+Break or closing command prompt window.3221225794
-1073741502The application failed to initialize properly. Now "Error Code:1" is received. Passwords are NO LONGER sent in clear text, which is very cool.
MSDN News Loading... V1.98. It runs fine on peminfo02...Thanks in advanceGausie molotov Members Profile Send Private Message Find Members Posts Add to Buddy List Moderator Group Joined: 04 October 2006 Status: Offline Points: 17526 Post Marked as answer by Yuan WangMicrosoft employee, Moderator Monday, July 11, 2011 1:37 PM Monday, June 06, 2011 9:08 AM Reply | Quote 0 Sign in to vote Hi ,