auto starting of programs?

Posted by: newguy1

auto starting of programs? - 22/08/2003 06:58

Is it possible for one program(TV Tool)to sense when another program(POWER DVD) opens and then itself open up?
Here's the long story.When I play a DVD on my computer i'm able to view it on my tv from my video card.Problem is my video card doesn't display it properly on the tv so I need to use TV tool to correct it.Not a big deal but in order for my wife/son to watch a dvd they have to insert the disc(auto play is enabled so the movie starts by itself)then open tv tool and enable the tv mode.I'd like it to all be automatic so all they need to do is insert the disc and watch movie.If tv tool can sense when power dvd is open and enable tv mode then I think it will work.
Anyone care to see if they can help?
Mike
Posted by: tfabris

Re: auto starting of programs? - 22/08/2003 09:05

You could write a third program which launches both TVTool and PowerDVD, then associate *that* program with the DVD auto-run feature. Heck, that program could even be a DOS batch file if you wanted. (start c:\tvtool\tvtool.exe, start c:\powerdvd\powerdvd.exe)

Unless PowerDVD or TVTool have a shellExecute function built-in somewhere. I'm not too familiar with those programs. PowerDVD has a lot of features, maybe it's buried in there somewhere.
Posted by: newguy1

Re: auto starting of programs? - 22/08/2003 12:13

You could write a third program which launches both TVTool and PowerDVD, then associate *that* program with the DVD auto-run feature. Heck, that program could even be a DOS batch file if you wanted. (start c:\tvtool\tvtool.exe, start c:\powerdvd\powerdvd.exe)

Thats the problem I don't have a clue how to do that. I was hoping a fellow forum member could show me the light.
Posted by: tfabris

Re: auto starting of programs? - 22/08/2003 12:21

First part. Create a batch file in Notepad. Name it "launchdvd.bat". Save it in "c:\program files\launchdvd".

Inside the batch file make it:

@echo off
start c:\program files\tvtool\tvtool.exe
start c:\program files\powerdvd\powerdvd.exe
@cls


(Note that you need to put the correct paths and filenames for powerdvd and tvtool in there, I don't know what they really are).

Then you need to figure out how to associate inserted DVDs with a program. Right now it's associated with powerdvd. I'm not exactly sure how to do it from the Windows GUI (perhaps someone else can fill that part in). Another way you could do it is to try searching the registry for the powerdvd file name. There will be a bunch of false matches, but one of them will be the launching of powerdvd associated with your DVD drive. When you find it, you can edit it to point to c:\program files\launchdvd\launchdvd.bat.

Finally, PowerDVD might have a feature where it re-associates itself with the registry each time it runs. That's probably an option in its menus somewhere, so if it's there, disable that.

That should be all you need.

Note that I haven't tried this (don't have a DVD player on this PC), so I can't test it. But it should work.
Posted by: wfaulk

Re: auto starting of programs? - 22/08/2003 12:59

The program run when Audio CDs are inserted is (or at least used to be) in the File Types dialog as AudioCD, I believe. I'd imagine that the one for DVDs would be there, too.
Posted by: tfabris

Re: auto starting of programs? - 22/08/2003 13:04

I know that the program associated with audio CD tracks (shown in the filesystem as .CDA files) is in the filetypes dialog. But I didn't know if that was the same thing as the auto-insert-notification thingy.
Posted by: wfaulk

Re: auto starting of programs? - 22/08/2003 13:33

Nope. It's different than that one. The extension is listed as `N/A', and the type is AudioCD. The indivdual tracks are separate from that.
Posted by: tfabris

Re: auto starting of programs? - 22/08/2003 14:22

Cool, then.

Okay, did you hear what Bitt said? Look in the File Types dialog and see if you can find a DVD movie option. If so, that's what you set to point to that batch file.
Posted by: newguy1

Re: auto starting of programs? - 23/08/2003 05:18

Ok thanks, I'll work on that and get back here.
Btw im using win 2k with powerdvd xp 4 and tv tool version 8.2
Posted by: newguy1

Re: auto starting of programs? - 24/08/2003 14:41

Well I was able to write a batch program for powerdvd and tv tool.But tv tool doesnt start until I close power dvd.It didnt work at all as tony suggested so I tried it another way (see attachment)
Now if that would work the other problem I have is how to have the batch file emulate keyboard strokes.One to press "enter" for power dvd and the other to do "ctrl and F1 " for Tv tool Is that possible?
Posted by: ricin

Re: auto starting of programs? - 24/08/2003 14:47

Easiest way to do something like that would be to use WinBatch, but it isn't free.
Posted by: newguy1

Re: auto starting of programs? - 24/08/2003 17:19

Have you ever used that program?
Posted by: ricin

Re: auto starting of programs? - 24/08/2003 17:45

Yes. Used it quite a lot when I worked for Kaiser.
Send me a PM with your e-mail address (or a IM name (ICQ, AIM, whatever)) and we can work out exactly what you need it to do, then maybe I'll write it, compile it and send it to you.
Posted by: tfabris

Re: auto starting of programs? - 24/08/2003 19:23

tv tool doesnt start until I close power dvd.
That's odd. I thought the Start command didn't block unless you gave it the /W switch. I don't understand that....
Posted by: tfabris

Re: auto starting of programs? - 24/08/2003 19:24

Easiest way to do something like that would be to use WinBatch, but it isn't free.
Or Visual Basic, or Delphi, or whatever. Anything that'll do a shell execute and a sendkeys. I'm still not understanding why the Start command didn't work. Odd!
Posted by: ricin

Re: auto starting of programs? - 24/08/2003 19:26

The batch file he attached shows he didn't use the start command.
Posted by: tfabris

Re: auto starting of programs? - 24/08/2003 19:27

The batch file he attached shows he didn't use the start command.
But mine did. And he said that when he tried it my way, it blocked until the first program was done. I just don't get that....
Posted by: ricin

Re: auto starting of programs? - 24/08/2003 19:27

Yep, but for someone who doesn't normally program, WinBatch is probably the easiest to get working.