TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech World > TIPS 'n' TRICKS

Notices

Looping Batch file - try this out!

TIPS 'n' TRICKS


Reply
 
Thread Tools Display Modes
Old 27-03-2008, 03:49 PM   #11
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Re: Looping Batch file - try this out!

well the VB code to kill any task is
Code:
a = Shell("cmd.exe /c TASKKILL /IM taskname.exe /F")
and replace taskname by it's name...
for taskmanager
Code:
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
a full program loop to kill taskmanager process tht i made past it form load
Code:
Form1.Hide
1
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
Goto 1
copy it after compile to startup directory... to let the program run on every startup ... but renaming the taskmanager program will make this tool unuseful
so it's very similar to your batch
Code:
Form1.Hide
1
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
Goto 1
Code:
@echo off
:1
start cmd.exe
taskkill /im taskmgr.exe
goto 1
__________________
Mawarebytes
Ccleaner
KillBox

Last edited by Hatrix; 27-03-2008 at 03:51 PM..
Hatrix is offline   Reply With Quote
Old 27-03-2008, 04:13 PM   #12
Junior Member (25+)
 
jjaadd's Avatar
 
Join Date: Mar 2008
Location: lebanon
Age: 16
Posts: 71
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0 jjaadd is an unknown quantity at this point


OS: Windows XP Windows Vista


Re: Looping Batch file - try this out!

u mean that the vb code will prevent the taskmanager from loading or it will close it similar to my batch? or it loads but in hidden mode?
because mine do this thing: every time taskmanager is opened it will close it by the taskkill command
do ur vb script do the same as here?
__________________
u think that i helped u with this post?
reputate me!!!

Last edited by jjaadd; 27-03-2008 at 04:19 PM..
jjaadd is offline   Reply With Quote
Old 27-03-2008, 07:03 PM   #13
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Re: Looping Batch file - try this out!

well same work as your batch, and same codes also c the colors

Code:
Form1.Hide
1
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
Goto 1
Code:
@echo off
:1
start cmd.exe
taskkill /im taskmgr.exe
goto 1
Hatrix is offline   Reply With Quote
Old 27-03-2008, 10:39 PM   #14
Junior Member (25+)
 
jjaadd's Avatar
 
Join Date: Mar 2008
Location: lebanon
Age: 16
Posts: 71
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0 jjaadd is an unknown quantity at this point


OS: Windows XP Windows Vista


Re: Looping Batch file - try this out!

hehe yeah im good at batch but im starting to learn vb on the net its very difficult and i dont have visual basic so i do the scripts on notepad and executes them to c wat happens and i barely know these things i just understands them
__________________
u think that i helped u with this post?
reputate me!!!
jjaadd is offline   Reply With Quote
Old 28-03-2008, 04:29 AM   #15
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Re: Looping Batch file - try this out!

nope VB has a compiler...not a compiler but a program like it... so it's very rar to make vb programs using notepad... some VBS visual basic scripts are made of notepads,,,
Hatrix is offline   Reply With Quote
Old 17-04-2008, 07:46 PM   #16
Newbie
 
blunosedan's Avatar
 
Join Date: Apr 2008
Age: 20
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 2 blunosedan is on a distinguished road
Send a message via MSN to blunosedan
Re: Looping Batch file - try this out!

hahahahah....good one!

saw it straight away, but good for the novice!
blunosedan is offline   Reply With Quote
Old 18-04-2008, 01:46 AM   #17
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Re: Looping Batch file - try this out!

yea totally true... if u are talking abt wht jjaadd wrote.... lol
Hatrix is offline   Reply With Quote
Old 18-04-2008, 07:23 AM   #18
News Reporter
 
1mAn3rd's Avatar
 
Join Date: Nov 2007
Location: Guilford CT, United States
Posts: 395
Thanks: 28
Thanked 20 Times in 20 Posts
Rep Power: 5 1mAn3rd will become famous soon enough


OS: Windows 98 / Windows ME Windows NT / Windows 2000 Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux Mac OS


Send a message via AIM to 1mAn3rd
Re: Looping Batch file - try this out!

LOL

@jjaadd and Wolfie: There is an easier way then what both of you said:

Code:
echo off
:a
start
goto a
That's it It's the easiest way to make a loop. Just the :whatever and then 'goto whatever' will go to the part. It's sort of like making a sticky, and telling it to go to a sticky. And just plain 'start' will start a new command prompt. And again, no you don't need to go into the task manager to stop this. Just end the first batch file that you started and it will stop popping up. It will stop because the loop is only being executed from the 1rst one that you opened. I hope I taught a simple lesson on batch files, and I could say more, but it would be off topic.
__________________
--1mAn3rd
1mAn3rd is offline   Reply With Quote
Old 19-04-2008, 07:01 PM   #19
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Re: Looping Batch file - try this out!

Quote:
Originally Posted by jjaadd View Post
man this is a loop for opening a cmd window
@echo off
:1
start cmd.exe
goto 1

and its over. c how simple!!
lol u just changed 1 by a
lol u should look b4 u post lmao
Hatrix is offline   Reply With Quote
Old 20-04-2008, 09:58 PM   #20
News Reporter
 
1mAn3rd's Avatar
 
Join Date: Nov 2007
Location: Guilford CT, United States
Posts: 395
Thanks: 28
Thanked 20 Times in 20 Posts
Rep Power: 5 1mAn3rd will become famous soon enough


OS: Windows 98 / Windows ME Windows NT / Windows 2000 Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux Mac OS


Send a message via AIM to 1mAn3rd
Re: Looping Batch file - try this out!

Hmm everyone keeps on saying that it's
'start cmd.exe'
NO! It's not. Just plain old
'start'
will start another command prompt.
__________________
--1mAn3rd
1mAn3rd is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 07:26 PM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional