Results 1 to 8 of 8

Thread: [2005] Restart processes that have the same name.

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    [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.

  2. #2
    Addicted Member
    Join Date
    May 2008
    Location
    Denmark
    Posts
    178

    Re: [2005] Restart processes that have the same name.

    Can't you just do:

    vb.net Code:
    1. Process.Start("bms.exe", "-x bar -restart")
    ?

  3. #3
    Hyperactive Member
    Join Date
    Jun 2008
    Location
    Nowhere
    Posts
    427

    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.
    "Programming is like sex. One mistake and you have to support it for the rest of your life." ~Michael Sinz


    Code Snippets/Usefull Links:
    WinRAR DLL|Vista Style Form|Krypton Component Library|Windows Form Aero|Parsing XML files|Calculate File's CRC 32|Download a list of files.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: [2005] Restart processes that have the same name.

    Quote Originally Posted by Link
    Can't you just do:

    vb.net Code:
    1. 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

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    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.

  6. #6
    Addicted Member
    Join Date
    May 2008
    Location
    Denmark
    Posts
    178

    Re: [2005] Restart processes that have the same name.

    Oh

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: [2005] Restart processes that have the same name.

    Quote 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.

  8. #8
    Addicted Member
    Join Date
    May 2008
    Location
    Denmark
    Posts
    178

    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
  •  



Click Here to Expand Forum to Full Width