Jump to content

Opening two programs with one filetype


Recommended Posts

Hello! I'm just wondering if this is possible... Can you set things up so that when you open a certain type of file, it opens two programs at once? For example, if I doubleclick on an mp3 file, it plays that file in my player and also opens a game? Thanks for any reply!

Link to comment
Share on other sites


Ah darn, ok, thank you!

Hm, I don't suppose it would be possible to make a .bat and then have the shortcut open that .bat? Is there some way to tell the .bat file to open 'winamp.exe' with 'song.mp3' when you click on 'song.mp3'? Or can a bat just open a program, not load something into it?

I've never really made a .bat before, I have a rough idea of how to do it but no idea of what you can actually do with it ; )

Thanks very much for the help anyway!

Link to comment
Share on other sites

Open notepad.

Paste this into it:

"c:\Program Files\Winamp\winamp.exe"  D:\songs\filename.mp3
C:\folder\gamename\program.exe

save it as "whatever.BAT" (note the double quotes around the filename while saving in notepad, you need it, otherwise the file will end up with a .TXT extension)

The first line opens winamp and loads the specified MP3 into it for playing.

The second line runs your game.

Both lines are just examples, you have to change the folder and file-names specified there as per your OWN needs.

Do tell us how it goes... :yes:

Link to comment
Share on other sites

Or something like this

REGEDIT4

[HKEY_CURRENT_USER\Software\Classes\.mp3]
@="mp3file"

[HKEY_CURRENT_USER\Software\Classes\mp3file\shell\open\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\" && start \"C:\\folder\\gamename\\program.exe\""

Link to comment
Share on other sites

Or In Vbs

CreateObject("Wscript.shell").run("Path To\winamp.exe D:\songs\filename.mp3")
Also This Will Work If Winamp Is Installed And Is The Defualt MP3 Player
CreateObject("Wscript.shell").run("D:\songs\filename.mp3")

Since This Is Vbs And There Is No Stops It Will

Start The Next Line like it was running 2 at once.

Dim Act : Act = CreateObject("Wscript.shell")

Act.run("D:\songs\filename.mp3")

Act.run("Next Thing To Do")

Edited by gunsmokingman
Link to comment
Share on other sites

Thanks so much for the replies! Sorry it's taken me so long to come back and check!

Prathapml - Thank you, that does work! I was kind of hoping to be able to just open any mp3 though (Rather than one specific mp3), but that'll certainly work if that's not possible. Thanks!

Yzöwl - That looks really good, it looks like it would do exactly what I want, but when I went into regedit I couldn't find the folders you have - There's no .mp3 or mp3file folders in my 'Classes' folder... I'm using Windows XP, if that makes a difference.

Sorry, I'm really no expert at these things - The main reason I'm doing this rather than just opening the two programs seperately is to learn more about what's possible, but it unfortunately means I need step by step kind of instructions to really understand : \

Gunsmokingman - That looks really good too! I'm not sure if I have VBS though, that's Visual Basic isn't it? Unless there's something that comes with windows to run that I'm afraid I don't have it...

Thanks again for all the help, it's really great of you to take the time! Sorry I need to ask all these extra questions...

Link to comment
Share on other sites

VBS is standard in windows, so you have that...you should have .mp3 and mp3file in your regsitry...tho you may not have mp3's associated, so you may not have them...try associating mp3s with winamp and you should get those reg keys in there...also...I would use the vbs or reg file posted since those are the best methods...I prefer reg since you DO NOT have to specify a mp3 file, itll open any mp3 file along with a game. Tho you do have to specify the game in the reg file.

Link to comment
Share on other sites

Yzöwl - That looks really good, it looks like it would do exactly what I want, but when I went into regedit I couldn't find the folders you have - There's no .mp3 or mp3file folders in my 'Classes' folder... I'm using Windows XP, if that makes a difference.

There will not be existing keys and subkeys in the location I gave, the existing ones will be in HKEY_LOCAL_MACHINE\SOFTWARE\Classes. However, because this tweak is a personal one, it is better in your own profile, just run the REG file I gave and the options should be available for the current user only and the 'global' setting will remain untouched for your other users.

Link to comment
Share on other sites

Sorry again for how long it's taken me to reply... I kept checking the page for updates without noticing there was a page two, I feel like such an id***! :blushing:

That worked great Yzöwl thanks! Thank you all for your help and patience, I really appreciate it and I've learned a new trick! :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...