Saved Bookmarks
| 1. |
Solve : Need help with script? |
|
Answer» Quote from: edwis1345 on November 29, 2014, 04:45:25 AM I want to figure out how to do this You misunderstood my question. What business or other task do you have that needs this? Anyone can help me with this? I need to run proccesses listed in .txt file if they are killed. @echo off @echo off &setlocal enabledelayedexpansion tasklist /FO list|find /i ".exe">%temp%\running.tmp for /f "tokens=2*" %%a in (%temp%\running.tmp) do ( call :process %%B ) pause exit /b :process for /f "tokens=*" %%c in (sarasas.txt) do if "%*"=="%%c" ( set Answ=N echo Isjungti procesa? set /p Answ=Isjungti? %*? IF /I NOT "!Answ!"=="Y" GOTO :EOF if errorlevel 1 goto :EOF echo Killing %%c taskkill /f /im "%%c" ) Quote from: edwis1345 on November 29, 2014, 07:25:23 AM Anyone can help me with this? People that help in forums like this generally do so because they like coding, and understanding why a task is being performed gives them some satisfaction - and if you answer their questions then they will probably bend over backwards to help you. A second benefit of DISCUSSING the tasks properly is that these helpers will often use their experience and KNOWLEDGE to give you a robust script that also works in situations that you hadn't YET considered. |
|