running a program more than once

Just starting out? Need help? Post your questions and find answers here.
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

running a program more than once

Post by jrw »

Why does some software stop the user from running the program more than once?. If I run Windows Media Player twice it gives focus to the first instance of the application and not two WMPplayer windows. If anyone has any pointers on how to run an application twice I would be grateful, I've searched on google about mutex, process id's and it seems that no one else knows how to do it.
prog$="C:\Program Files\Windows Media Player\wmplayer.exe"
RunProgram(prog$)
Delay(4000)
RunProgram(prog$)
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

it part of what they coded into wmplayer and others
~Dreglor
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: running a program more than once

Post by PB »

> If I run Windows Media Player twice it gives focus to the first instance of
> the application and not two WMPplayer windows

Select the option that says Open a new player for each media file played. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

Re: running a program more than once

Post by jrw »

PB wrote:> If I run Windows Media Player twice it gives focus to the first instance of
> the application and not two WMPplayer windows

Select the option that says Open a new player for each media file played. ;)
thanks but it was just an example.... Im trying to run a webserver twice but there is no such option, which is silly really because I can run one web service on port 80 and other port 8080. I guess I will just have to use two PC's...crazy

btw I couldn't find that option in Windows Media Player 10 either, which menu/tab is it on?. Not sure why this has been put into off-topic, when Im trying to find a way of bypassing mutex with a purebasic program launcher :)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: running a program more than once

Post by PB »

> I couldn't find that option in Windows Media Player 10

Oh, sorry, I'm not running WMP 10. You didn't say which version you were
running, so I just went by my version number. I don't have 10 installed so
I can't check it. Personally, I use Media Player Classic anyway, it's better!

> Im trying to find a way of bypassing mutex with a purebasic program launcher

I see. I don't think you can disable a mutex created by another app. Try
putting the app into a different folder... not all apps use mutexes and running
it from two different locations can sometimes trick it into running twice.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

Or, in this case. If the web server is any good, it should be
possible to use some kind of virtual host.
By editing a config file or something..
Instead of running two of them i mean..
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

ooof course
use kfws stop using bullcrap
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

and youll get many headackes because not everyone allows http at port 8080 just letting you know
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

Post by jrw »

dagcrack wrote:ooof course
use kfws stop using bullcrap
It's not a microsoft webserver, its an application that broadcasts webcams. You can change the port of the 'webserver' it broadcasts on but you can't run it more than once. If I could run it twice I would use port 80 and 81 or whatever. I tried a few tricks like installing the application in two different directories and also the subtst trick but neither worked. For now I am using two PC's :cry:

I think you are right about not being able to bypass a mutex application, I guess I will have to write a client to send the webcam images to the server but I don't like reverse engineering code.

thanks in advance.

btw mediplayer classic is ok but the best mediaplayer is Zoomplayer WMV Professional :)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

you could dissassemble & just remove the call to the openmutex_() command... if app's not well protected that could be done easly, otherwise you could write a hook in a dll and then inject that dll [i think that PolyVector might come up with a nice lib in some time.. at least i hope that :D]

absolutely best players :D :

Winamp(music & sometimes movies wo subtitles), BSPlayer(movies with subtitles.) & PowerDVD(dvd's :D)
and Real Alternative(realplayer etc.)

yup that should do all the playing you need.-.
Post Reply