Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Plugins Page: 1  Previous   Next
Tool: DvdpRebootGuard
Author Message
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
My latest adventure in ProfilerQuery showed me that when a PC is restarted, a running program is not treated the same as when it is closed in a normal manner. That led me to thinking: What if that's why I have problems with DVD Profiler if my PC is restarted while Profiler is running? It usually wants a repair when I start it up again.

I asked myself, can I write a program that sits in the background, senses when a restart occurs, and takes down DVD Profiler in a controlled manner?

So i sat down to write a program, or two programs, actually. One background program, and one small utility to control said background program.


Here is what it looks like when the background program is not running.


And here is what it looks like when the background program is running.

When you click Start, the background program starts (duh!), and it also registers itself to run on Windows startup.

So Stop does what you think it does, and also unregisters the program from autostarting.

The big question: Does it actually work? Well, I was a bit uncertain, because it sends keystrokes to DVD Profiler at the same time that Windows starts it shutdown. And it's impossible to see if it actually does take down Profiler nicely. But I have tried it 5 times and Profiler has never complained when I started it again after the restart. Will it work for you? It won't do any harm to try.

DvdpRebootGuard 1.0.0
My freeware tools for DVD Profiler users.
Gunnar
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
It should be noted that this will possibly not work if you are running a translated version of DVD Profiler.
Initially I tried sending Alt-F4 for closing down Profiler. If this had worked, it would have worked regardless of translation. Unfortunately I could not get that to work.

So, at least for now, this program relies on Alt-f opening the File menu, then up arrow and enter, to select the last menuitem in the File menu, which should be Exit DVD Profiler.

If you're using the French translation, you're in luck. The French translator has chosen Fichier, so Alt-f will still work. Italian uses File, Norwegian uses Fil, Portugese uses Fisherio, Danish uses Filer. So all those should work.

In the Spanish translation it's Archivo, so that would have required an Alt-a. The Dutch translation uses Bestand,. Finnish uses Tiedosto, Swedish uses Arkiv (my fault). So those would require a configurable option in DvdpRebootGuard.

The German translation, I'm sorry to say, has no shortcut keys at all, so you guys are definitely out of luck, unless someone updates that translation. I haven't checked all other translations.

If anyone who uses a translation that requires something else than Alt-f wants to use this program, please let me know. I can add a configurable setting without too much work, but I'm not going to do it unless someone actually has a use for it.

And if anyone wonders - No, I am not using the Swedish translation myself, even though I am the one who created it.

EDIT: I only checked the translations that came with the latest Profiler release. There could be other translations that differ from the above.
My freeware tools for DVD Profiler users.
Gunnar
 Last edited: by GSyren
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote


Well, I guess it's not always good news when professor Farnsworth annonces it, but this is in fact good news. For some, hopefully.

I had a why-didn't-I-think-of-that-from-the-beginning moment. And what did I not think of, you may ask. When I found that it didn't work sending Alt-F4 using SendKeys, I didn't think of testing if it would work with AutoIt. But I thought of it now. Better late than never. And it did work.

So this means that DvdpRebootGuard 1.1.0 should work regardless of what translation you are using in DVD Profiler. It should even work for you guys in Germany! Glückliche Tage! 

DvdpRebootGuard 1.1.0


EDIT: Just one caveat: It won't work if you have Profiler minimized to the system tray. I can't send keystrokes to Profiler while it is minimized there, and I have found no way to restore it programatically from the system tray. If it is minimized in the normal way, it works fine, but not in the system tray.
My freeware tools for DVD Profiler users.
Gunnar
 Last edited: by GSyren
DVD Profiler Desktop and Mobile Registrantspecise_8472
It wasn't me...
Registered: January 27, 2009
New Zealand Posts: 181
Posted:
PM this userDirect link to this postReply with quote
What language do you hack in?

Looks like quite easy to restore window if using 'higher' level language.

if (MyForm.WindowState == FormWindowState.Minimized)
{
    MyForm.WindowState = FormWindowState.Normal;
}
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting specise_8472:
Quote:
What language do you hack in?

Looks like quite easy to restore window if using 'higher' level language.

if (MyForm.WindowState == FormWindowState.Minimized)
{
    MyForm.WindowState = FormWindowState.Normal;
}

Yeah, but it's not about restoring my window, it's about restoring another program's window (in this case DVD Profiler).

And FYI I've been stubbornly using VB for more than 25 years and I'm not about to change unless I have to. Not that I'm opposed to change if there is a good reason; I switched from WinForms to WPF well over 10 years ago.
My freeware tools for DVD Profiler users.
Gunnar
DVD Profiler Desktop and Mobile Registrantspecise_8472
It wasn't me...
Registered: January 27, 2009
New Zealand Posts: 181
Posted:
PM this userDirect link to this postReply with quote
Opps, my bad.
Anyway here is one way to get what you want, but may not be what you want

https://social.msdn.microsoft.com/Forums/vstudio/en-US/4c4f60ce-3573-433d-994e-9c17f95187f0/finding-which-applications-and-services-are-listed-in-the-system-tray.
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I don't need to go through all that to deduce that Profiler has been minimized to the system tray. The fact that I can find the process, but not the window, will tell me that.

It's forcing it to restore the main window that's the problem. And one that I have researched that quite a bit, without any success, unfortunately.
My freeware tools for DVD Profiler users.
Gunnar
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,686
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I have noticed that something has changed in Windows 10 recently. When I restart Windows it no longer takes down DVD Profiler, but insteads hangs and waits for Profiler to exit. So I guess that DvdpRebootGuard no longer fills any function. 
My freeware tools for DVD Profiler users.
Gunnar
    Invelos Forums->DVD Profiler: Plugins Page: 1  Previous   Next