Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 12-29-2010, 12:38 AM   #1
Beta Member
Join Date: Dec 2010
Posts: 1
Default Batch File Help

So is there any command I can use in a batch file so that it opens up a file, and if the user tries to close the program, it automatically opens back up?

so like

i have this

@echo off

start C:\Users\Suh\Desktop\taskkiller.bat

how can i make it so that if the person that opens the batch file, and then taskkiller.bat executes, and if that person tries to close taskkiller.bat, it automatically opens back up again?

Thanks in advance

J003S3PH is offline   Reply With Quote
Old 01-30-2011, 02:48 AM   #2
Baseband Member
Shazer2's Avatar
Join Date: May 2009
Posts: 89
Default Re: Batch File Help

You need to research loops, although I am unsure whether this is possible.

Looking up loops would be your best bet though.

Need some PHP questions answered? Give me a PM and I will see what I can do.
Shazer2 is offline   Reply With Quote
Old 01-30-2011, 07:56 AM   #3
Daemon Poster
JCB's Avatar
Join Date: Oct 2004
Posts: 1,302
Default Re: Batch File Help

i dont think it can be done, even a loop wont work if the .bat file is closed
Check Out My Computer Related YouTube Channel @ Click Here
JCB is offline   Reply With Quote
Old 03-08-2011, 03:30 PM   #4
Baseband Member
Join Date: Mar 2011
Posts: 52
Default Re: Batch File Help

I had this work before (I would get 500+ windows in a split second) but they patched it in Windows SP2.

O...k. I am back and it seems this buggedy bug still works.
I was able to stop it but only by locking my OS (win+L) and going back in..
Please only try this if you have a strong system:

ECHO err...pwn3d
START pwn3d.bat

It works here. Haha.
It created 437 windows until I locked it.
CFu is offline   Reply With Quote
Old 03-09-2011, 11:13 AM   #5
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 8,096
Default Re: Batch File Help

yes, oddly enough if you open a batch file that then opens itself and that open one opens itself etc you get a massive recursive loop.

and end up with lots of windows open.

for the original poster.

There is nothing in a batch file that can check that a child process it has spawned is running.

a batch file is just a list of commands after all not an actual program.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 10:33 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0