danmalks wrote:
> Thanks. You seem familiar with windows. Do you know what the recommended
> approach would be to do the following:
> a) check if lms is running
> b) if not, start it, then stop it (you've already provided a suggestion
> for the start/stop tasks)
>
> Thanks,
> Dan
Hi Dan,
actually Windows should take care of that for you, though it's of course
possible to do this check through some kind of command line batch. Copy
paste the following code into notepad and save it as
CHECK_RESTART_LMS.BAT somewhere you can remember.
Code:
--------------------
@ECHO OFF
for /F "tokens=3 delims=: " %%H in ('sc query "logitechmediaserver" ^|
findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
REM Put your code you want to execute here
REM For example, the following line
net start "logitechmediaserver"
)
)
--------------------
First test this on a command prompt (same process as before to obtain
it). If you have no administrative rights on your PC you'll get a
message like this:
Code:
--------------------
C:\Users\username\Desktop>CHECK_RESTART_LMS.BAT
System error 5 has occurred.
Access is denied.
--------------------
If instead you get a success this message you already have
administrative rights, and you can just doubleclick
CHECK_RESTART_LMS.BAT from now on to do its job.
Otherwise you'll need an "elevated command prompt": just click the start
button/hit the windows key on your keyboard and type CMD. You'll get
search results, one of which will be "Command Prompt", right-click it
and choose "Run as administrator" and run you file again from the
location where you saved it (easiest is to just drag and drop it onto
this window).
You should get a success message. If you do, next time no need to go
through all this, just right-click CHECK_RESTART_LMS.BAT and directly
choose "Run as administrator".
I don't have LMS installed on Windows anymore, so the service name
"logitechmediaserver" could be wrong. If you start task manager and go
to the "Services" you'll be able to find the name. It's possible that
you need to either click "More details" to show this tab, depending on
you Windows version.
Main System: Touch; Marantz SR-5004 + TMA Premium 905 + TMA Premium 901
+ Teufel Ultima 20 Mk 2 + BK Monolith+ FF + Lenovo T460 + Kodi + Pioneer
PDP-LX5090H
Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
Kitchen: iPhone 5s + iPeng (local playback activated) + NAD 312 + Teufel
Ultima 20 Mk 2
Headphone (cozy corner): Lenovo T550 + Squeezelite-X + Cyrus Soundkey +
Topping A30 + Focal Elear
Car: TBC ...
------------------------------------------------------------------------
bakker_be's Profile: http://forums.slimdevices.com/member.php?userid=30369
View this thread: http://forums.slimdevices.com/showthread.php?t=108898
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins