Search Results

Search found 6 results on 1 pages for 'murxx'.

Page 1/1 | 1 

  • exit /B 0 does not work

    - by murxx
    I have the following problem: I have created a batch script which calls itself in there (for being able to write a log in parallel). In the script I start another process (like start startServer.bat) which starts up a java process and keeps opened up all the time. In my original script I wait 30 seconds, check if the process is running and do an: exit /B 0 Unfortunately that does not work, the window shows that the exit /B 0 is being evaluated, but the window still keeps open. When I close the window with the other process (meaning the "child" processes started up in my .bat) my script continues its run. So: scriptA.bat -> in there I call: start startServer.bat -> wait 30 seconds -> check is server is started -> exit /B 0 Process hangs up! What's very odd, if I wrap another script around, like: scriptB.bat -> call scriptA.bat -----> in there I call: start startServer.bat -----> wait 30 seconds -----> check if server is started -----> exit /B 0 -> scriptA.bat continues without any hangup! I also tried the same with exit 0 (without /B) also, same result! In the first case it hangs up, in the second case my window closes as expected... Has anyone of you ever had such a problem before and knows what's wrong here? Process hangs up!

    Read the article

  • exit /B 0 does not work...

    - by murxx
    Hi, I have the following problem: I have created a batch script which calls itself in there (for being able to write a log in parallel). In the script I start another process (like start startServer.bat) which starts up a java process and keeps opened up all the time. In my original script I wait 30 seconds, check if the process is running and do an: exit /B 0 Unfortunately that does not work, the window shows that the exit /B 0 is being evaluated, but the window still keeps open. When I close the window with the other process (meaning the "child" processes started up in my .bat) my script continues its run. So: scriptA.bat - in there I call: start startServer.bat - wait 30 seconds - check is server is started - exit /B 0 Process hangs up! What's very odd, if I wrap another script around, like: scriptB.bat - call scriptA.bat ----- in there I call: start startServer.bat ----- wait 30 seconds ----- check is server is started ----- exit /B 0 - scriptA.bat continues without any hangup! I also tried the same with exit 0 (without /B) also, same result! In the first case it hangs up, in the second case my window closes as expected... Has anyone of you ever had such a problem before and knows what's wrong here? Process hangs up!

    Read the article

  • WMCI - how to get the ERRORLEVEL

    - by murxx
    Hi, I want to use the "wmic" command for finding out if a specific java process is still up and running. E.g. wmic process where "commandLine like '%ACTMonitor%' and executablePath like '%PATH1%' and name like '%java%'" The problem now is that the errorlevel of this command is always 0, no matter if there is a process listed or not. How can I manage to get an errorlevel != 0 in case the process is not up anymore? Or can one of you tell me another suggestion on how to be able to continue in a .bat script with this information... Thanks in advance!

    Read the article

  • Windows batch file: Pipe destroys my return code

    - by murxx
    Hi, is it possible to return the errorlevel also if I pipe the output of a script into a logfile: test1.bat: call test2.bat 2>&1 | tee log.txt echo ERRORLEVEL: %ERRORLEVEL% test2.bat: exit /B 1 Output when calling test1.bat: ERRORLEVEL: 0 The errorlevel is always 0. The problem is, I want to call another script inside my script where the output should be redirected synchronously with the output shown in the command line, therefore a simple is not enough for me. I tried several ideas, but result is that the pipe always seems to destroy the given error-level... :( Can you give me any further suggestions? Thanks in advance... :)

    Read the article

  • How to apply %% to a variable in a script with input parameter?

    - by murxx
    Hi, I asked a question yesterday about how to manage to get %% around a variable without getting the evaluation. Well, the thing is, it does not work that way in my case... I have a .bat file which gets an input parameter. Later on I want to use the value of this input parameter and put %...% around, like: call script.bat testValue script.bat: set inputPar=%1 set newValue=%%inputPar%% Now I get: echo %inputPar% testValue echo %newValue% %inputPar% But I would like to get: echo %newValue% %testValue% Is that somehow possible?

    Read the article

  • How to ignore %% from being evaluated?

    - by murxx
    Hi, one of my variables has the value %val% - this is exactly the name! So: set variable=%val% What happens now is that when running the script the variable will be set to nothing as the %val% is being evaluated! But this is not what I want... How can I tell DOS to ignore the %-sign here? Can anybody out there help me with my question? Thanks a lot...

    Read the article

1