|
-
Jul 19th, 2008, 08:46 AM
#1
Thread Starter
Frenzied Member
[2005] Restart processes that have the same name.
Hello,
There is a process on my computer called bms.exe
Well bms.exe is opened twice, so on the taskmanager under processes, it shows bms.exe twice but they have different PIDs (whatever that is).
I want to loop through the process and restart those processes. I can't just loop through and then restart bms.exe, i need to start `both` the bms.exe processes.
I don't just want to open them both twice because they have different settings basicly...
BMS stands for: Buisness Music System.
The first bms.exe process has the default playlist.
Whell the other bms.exe process has a 'bar' playlist.
There is a bms manual that shows some code that can be written to restart each player. It says:
Code:
bms.exe -x "bar" -restart
then it is saved as a .bat file a (batch)
I am having problems with using their code they have supplied. So i am just going to make a small program of my self that restarts the default bms.exe and the bar bms.exe
How is this done? Maybe since they have different PIDs i can mix that into my code? I am not sure.
-
Jul 19th, 2008, 08:58 AM
#2
Addicted Member
Re: [2005] Restart processes that have the same name.
Can't you just do:
vb.net Code:
Process.Start("bms.exe", "-x bar -restart")
?
-
Jul 19th, 2008, 10:06 AM
#3
Hyperactive Member
Re: [2005] Restart processes that have the same name.
It can be simply done using cmd... use 'TASKLIST ' to find the im (Image Name) and pid (Process ID) and then use 'TASKKILL /?' and it gives you examples.
-
Jul 19th, 2008, 10:16 AM
#4
Thread Starter
Frenzied Member
Re: [2005] Restart processes that have the same name.
 Originally Posted by Link
Can't you just do:
vb.net Code:
Process.Start("bms.exe", "-x bar -restart")
?
Well as i said the code they supplied had bit of problems... well maybe... i don't think it will work though
-
Jul 19th, 2008, 10:23 AM
#5
Thread Starter
Frenzied Member
Re: [2005] Restart processes that have the same name.
Well actually yes it works.. the error was the "bar". It should have been just bar.
-
Jul 19th, 2008, 01:39 PM
#6
Addicted Member
Re: [2005] Restart processes that have the same name.
Oh
-
Jul 19th, 2008, 01:41 PM
#7
Thread Starter
Frenzied Member
Re: [2005] Restart processes that have the same name.
 Originally Posted by Link
Oh 
Im guessing you solved my problem without even knowing it. You left out the "", and that was exactly the anwser, leaving it out.
-
Jul 19th, 2008, 07:06 PM
#8
Addicted Member
Re: [2005] Restart processes that have the same name.
No, i didn't know it i just thought you wanted the code to start a program with parameters I leaved the double quote's out because else it would have been "-x "bar" -restart", and that is pretty messed up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|