[SOLVED] CMD command of "net stop" for Everything closes also Media Player Classic

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

[SOLVED] CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

I have been using sometimes a BAT script with such line

Code: Select all

net stop "Everything (1.5a)"
to be sure I stop all processes related to Everything. But I have noticed an annoying downside

This command will close also the first Media Player Classic HC instance if it has been opened by executing the play command from within the window of Everything i.e. if I have evoked the very first MPC by clicking a file from list of items in Everything. Such and only that instance will be closed - even if later on this instance will be loaded up with a file from not Everything, like for example by dragging and dropping a file to it from Windows Explorer. And what is interesting, somehow this does not happen in case of Winamp; i.e. it will remain running despite me having opened it in the same way as Media Player Classic

So: is there a way to make MPC immune to this BAT command alike to Winamp? Or: why does Everything affect MPC but not Winamp?
Last edited by Thy Grand Voidinesss on Sat Jan 31, 2026 1:57 pm, edited 3 times in total.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by void »

Stopping the Everything Service should have no effect on MPC.

What is the full contents of your BAT file.
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

The whole code

Code: Select all

@echo off
taskkill /IM Everything.exe
timeout /T 1 >nul
taskkill /IM Everything.exe /T /F
net stop "Everything (1.5a)"
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by therube »

Code: Select all

    /T                     Terminates the specified process and any
                           child processes which were started by it.
And as far as that goes, taskkill has been mentioned before (I'm pretty sure).

So is mpc-hc.exe a child of /IM Everything.exe ?

So it is not the net stop, but rather the taskkill - with the /T, that is the issue.

A single process is killed:

Code: Select all

C:\DEV\LOCATE\taskkill>taskkill /f  /fi "imagename eq killeverything.exe"
SUCCESS: The process with PID 3928 has been terminated.
Multiple processes are killed with /T:

Code: Select all

C:\DEV\LOCATE\taskkill>taskkill /f  /fi "imagename eq killeverything.exe" /t
SUCCESS: The process with PID 16340 (child process of PID 16888) has been terminated.
SUCCESS: The process with PID 16888 (child process of PID 1916) has been terminated.
SUCCESS: The process with PID 1916 (child process of PID 13436) has been terminated.
(In this case, the other 2 processes are mplayer.exe & MPUI-HCB (gui for mplayer.exe).)
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

Yes, I have tested this: it is the
/T
in the

Code: Select all

taskkill /IM Everything.exe /F /T
that is closing my video player [MPC-HC]

But how to explain the audio player [Winamp] not being affected by this line?


And would there be a way for Everything to somehow send a file to my

C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe

without Everything being registered by Windows as the culprit i.e. the igniter of MPC?
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

Thy Grand Voidinesss wrote: Tue May 06, 2025 7:41 pm [...]
how to explain the audio player [Winamp] not being affected by this line?
[...]
I still do not know

But I have found and answer to the question of
Thy Grand Voidinesss wrote: Tue May 06, 2025 7:41 pm would there be a way for Everything to somehow send a file
[...]
without Everything being registered by Windows as the culprit i.e. the igniter of MPC?
As it comes out when e.g. this Key

[HKEY_CLASSES_ROOT\mplayerc64.ram\shell\open\command]


will replace its default Value of

C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "%1"


with this alteration

cmd /c start "" "C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "%1"


then the problem goes away


However this Registry hack workaround has one slight issue:
the Command Prompt intermediary will cause a flickering effect on the title bar of any program from within which a file will be executed. This strobe-like visual effect is more profound when execution is performed with a double left-click and narrowed down to less repetitions when done by pressing of the Enter key


Below is a ready-to-use REG code for that explanatory obscure video file format:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\mplayerc64.ram\shell\open\command]
@="cmd /c start \"\" \"C:\\Program Files (x86)\\K-Lite Codec Pack\\MPC-HC64\\mpc-hc64.exe\" \"%1\""

; The above change will be automatically and instantly copied [by the Media Player Classic itself] also to
; [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mplayerc64.ram\shell\open\command]
Before using it I suggest exporting from the Registry the original Key and to stick to such forgotten file format, to avoid potentially messing up things for something often used like MKV or MPEG. And if you do not have a RAM video [i had literally 1 out of ~10 000], then for test purposes just rename extension of [probably] any other video file that gets played in you MPC. And I am being serious about it - because I did experience a [positive] glitch

Because during tests, after some time having passed, going back to using the default value of

C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "%1"


[in both of the Registry paths] did not seem to bring back anymore the issue with closing of Everything for this particular file format. In other words: the exemplary RAM was persisting its playback in MPC-HC despite being opened from within Everything and the Registry Key not having the CMD by-pass implemented. Maybe it might have been due to this cmd.exe workaround having caused Everything or Windows to re-cache how it launched MPC, thus blocking true restoration of the old behavior, because the cache maybe is not tied 1:1 to that pair of Registry entries? However during second run of test this I explored this theory thoroughly, with the Registry being searched for both the >>cmd /c start "" "C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "%1"<< and this obscure format >>.ram<< [which scarcity of usage / associations allowed for narrowing down the number of entries to be evaluated] - but this illogicality did not repeat itself


My tests were performed on Windows 10 Enterprise 20H2 x64 [10.0.19042] with Everything 1.5.0.1383a x64 Portable and Media Player Classic - Home Cinema 2.0.0.32 from K-Lite Mega Codec Pack 17.5.5 Mega
Last edited by Thy Grand Voidinesss on Tue Aug 19, 2025 7:10 am, edited 1 time in total.
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by therube »

(In MPC-HC v2.50.0, I saw the option to set a file type association for .ra (Real Audio), but not for .ram (per se, & unless I missed it).

.ra setups up a, [HKEY_CLASSES_ROOT\mplayerc64.ra\shell\open\command])


In any case, something like, CMD /C START "", spawns a new "shell", such that the association between Everything (the parent) & MPC-HC (the child) is "lost". Everything is no longer MPC-HC's parent, but rather MPC-HC is an entity unto itself (if you will).

So killing Everything no longer takes down MPC-HC.


(Maybe winamp does a cmd /c start-like action on its' own & that is why it was unaffected?)


1. double-click on Good Feelings.ogg
- Everything is parent, which spawned MPUI (which spawned mplayer)

2. double-click on go.bat
- Everything is parent, which spawned go.bat, which spawned a new shell (so at that point, parent-child relationships is lost), & that new shell spawned MPUI (which spawned mplayer)
(so killing Everything would have no affect on that second instance of MPUI)
.
Attachments
Everything $exec vs cmd c start.png
Everything $exec vs cmd c start.png (95.51 KiB) Viewed 8480 times
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

Re: [SOLVED] CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

(This is gibberish - read my next post instead of this one)


I changed system: from Windows 10 Enterprise 20H2 x64 [10.0.19042] to Windows 10 IOT Enterprise LTSC 21H2 x64 [19044.6575]

And it seems that on LTSC all that has to be done is an ordinary installation of MPC-HC from K-Lite Codec Pack with association to video formats - but performed after un-installation of Windows Media Player. There is no need for wrapping calls to MPC-HC in e.g. CMD, because closing of videos opened from within Everything does not make them be closed despite these videos still being child process of Everything like on my previous Windows. But without removal of WMP, the icons of video formats refuse to succumb to icon changes enacted via such REG adjustments

[HKEY_CLASSES_ROOT\mplayerc64.ram\DefaultIcon]
@="C:\\ICONS\\file-format video.ico,0"
Last edited by Thy Grand Voidinesss on Thu Jan 22, 2026 9:05 pm, edited 1 time in total.
Thy Grand Voidinesss
Posts: 825
Joined: Wed Jun 01, 2022 5:01 pm

Re: CMD command of "net stop" for Everything closes also Media Player Classic

Post by Thy Grand Voidinesss »

(My previous post had garbage explanation - the below version is correct)


I changed systems: from Windows 10 Enterprise 20H2 x64 [10.0.19042] to Windows 10 IOT Enterprise LTSC 21H2 x64 [19044.6575]

It seems that on LTSC all that I had to do was an ordinary installation of MPC-HC from K-Lite Codec Pack with association to video formats during the installation process - but performed after un-installation of Windows Media Player. There is no need for wrapping calls to MPC-HC in e.g. CMD, because closing of Everything does not close MPC-HC window that have been opened from within Everything. And that is because whenever I evoke MPC-HC window from it, the Sysinternals Process Explorer during inspection shows it to have Parent of e.g.
<Non-existent Process>(15924)
And without that removal of WMP, the icons of video formats refuse to succumb to changes enacted via such (exemplary) REG adjustment:

Code: Select all

[HKEY_CLASSES_ROOT\mplayerc64.ram\DefaultIcon]
@="C:\\ICONS\\file-format video.ico,0"
Post Reply