![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Senior Member (500+)
|
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")
for taskmanager Code:
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
past it form loadCode:
Form1.Hide
1
a = Shell("cmd.exe /c TASKKILL /IM taskmgr.exe /F")
Goto 1
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 Last edited by Hatrix; 27-03-2008 at 03:51 PM.. |
|
|
|
|
|
#12 |
|
Junior Member (25+)
Join Date: Mar 2008
Location: lebanon
Age: 16
Posts: 71
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0
![]() OS:
|
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.. |
|
|
|
|
|
#13 |
|
Senior Member (500+)
|
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 |
|
|
|
|
|
#14 |
|
Junior Member (25+)
Join Date: Mar 2008
Location: lebanon
Age: 16
Posts: 71
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0
![]() OS:
|
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!!! |
|
|
|
|
|
#15 |
|
Senior Member (500+)
|
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,,,
|
|
|
|
|
|
#16 |
|
Newbie
|
Re: Looping Batch file - try this out!
hahahahah....good one!
saw it straight away, but good for the novice! |
|
|
|
|
|
#17 |
|
Senior Member (500+)
|
Re: Looping Batch file - try this out!
yea totally true... if u are talking abt wht jjaadd wrote.... lol
|
|
|
|
|
|
#18 |
|
News Reporter
![]() |
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 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 |
|
|
|
|
|
#19 |
|
Senior Member (500+)
|
Re: Looping Batch file - try this out!
|
|
|
|
|
|
#20 |
|
News Reporter
![]() |
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |