Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
Can anyone help me on this:
I plan to create 2 scripts.
1)first one is to open a window and then execute some other commands
2)As when first one finish it's job the window did not close itself so I want to create a script to kill the window use taskkill command. Since I don't know when the first job complete I'll write a marcker file at the end of first script. I want my second script check if the marcker file exist and then perform the kill job. Some thing like if "macker file" exist do (perform taskkil)
Please help me on how to write the second script.
Thanks a lot

Post your first one and let's see what it's doing.
If at first you don't succeed, you're about average.M2

it is something like this:
script1 "test":
echo hello
notepad.exe
>jobdone -- marker file( need help here to create maker file)script 2 kill:
if jobdone not exist go to end-- need help here
For /F "tokens=2" %%n in ('tasklist ^| Find "notepad.exe"') Do Set Task=%%n
TaskKill /PID %task%
Set Task=
echo hello I have kill the test:end

"As when first one finish it's job the window did not close itself so I want to create a script to kill the window"
Unless you post the EXACT script, there's no way to tell why the window does not close.
If at first you don't succeed, you're about average.M2

btw, I want to use window schedule tasks to make it auto started the first script and schedule the second one to kill the first one ( The first one is not auto complete itself) notepad is an example here. I actually use an unix appliaction called reflection. when it run, it will create a r2win.exe. I can see it from window task or from tasklist
Thanks, any help is appreciated

i want to assign a text file contents to a variable in my batch file
so that i will use the variable as paramater
for my further command

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |