PDA

View Full Version : Execute Script plugin troubles



Aaron Zinck
2004-12-17, 23:29
A while back I tried using KDF's execute script plugin but struggled--I just
looked at it again after it was mentioned on this list the other day.

First things first:

this is my setup:
win2k
the Dec. 3rd nightly of slimserver 5.4
wired squeezebox

The script (startRhapsody.bat) is in C:\Program
Files\SlimServer\server\scripts and the plugin "sees" it just fine; that is,
it's available in the drop-down lists in the plugin settings. The script,
however, does not execute when the appropriate action is performed. I've
tried associating it with each of the available action options individually
but the plugin never executes it. The script behaves flawlessly when
manually launched from the command line.

It's not actually much of a script, consisting of just 2 lines designed to
launch Rhapsody:

"C:\Program Files\RealRhapsody\Rhapsody.exe"
quit

any ideas?

kdf
2004-12-18, 00:05
if you navigate to the plugin via the player interface, select that script and
press play, does it execute then?

Its been a very long time since I've done any testing on that script, so there
may have been changes to the event detection more recently. But, I'd liek to
know if you are able to execute it at all from the plugin first. I've never
tested it with Windows myself, but there is nothing that should prevent it from
working as long as the bat file is marked as executable by the os. The plugin
simply makes a system call to run the script selected.

-kdf

Quoting Aaron Zinck <azinck3 (AT) ufl (DOT) edu>:

> A while back I tried using KDF's execute script plugin but struggled--I just
> looked at it again after it was mentioned on this list the other day.
>
> First things first:
>
> this is my setup:
> win2k
> the Dec. 3rd nightly of slimserver 5.4
> wired squeezebox
>
> The script (startRhapsody.bat) is in C:\Program
> Files\SlimServer\server\scripts and the plugin "sees" it just fine; that is,
> it's available in the drop-down lists in the plugin settings. The script,
> however, does not execute when the appropriate action is performed. I've
> tried associating it with each of the available action options individually
> but the plugin never executes it. The script behaves flawlessly when
> manually launched from the command line.
>
> It's not actually much of a script, consisting of just 2 lines designed to
> launch Rhapsody:
>
> "C:\Program Files\RealRhapsody\Rhapsody.exe"
> quit
>
> any ideas?
>
>
>
>

kdf
2004-12-18, 00:22
Hi Aaron,

One other thing i forgot. You do have to go into the plugin via the player UI
to get the option to activate the event checker in the first place. Once you
have done that, it should persist across server restarts. Until you do that, it
does not monitor events even tho you have it checked in the web UI under server
settings->plugins.

-kdf

Aaron Zinck
2004-12-18, 11:35
Thanks for the response(s), kdf.

I hadn't poked around with the plugin on the device-interface side of things
so your tip about activating the event checker was key. However, even after
activating the checker I'm still having trouble. Now the events are being
monitored and the squeezebox display shows "running script" along with my
script name whenever the appropriate event is executed (I can also manually
run the script through the squeeze's plugin interface). However, the script
does not appear to actually run: I get no response on the server of any
kind.

On the off-chance that there was some issue with long file names I tried a
using the 8.3 file name convention both in the script and for the script
name itself. In this case, as with the long file names, the script could be
manually run from the command line but the when the plugin "ran" it there
was no response on the server. I also made a very simple script that just
prints "Hello" and contains the following two lines:

@echo "hello"
@pause

and that didn't work with the plugin, either.

Thanks for looking into this, kdf. Could it be some kind of permissions
thing? I should mention that I'm running slimserver as a service.


"kdf" <slim-mail (AT) deane-freeman (DOT) com> wrote in
message news:1103354567.41c3dac72846a (AT) callisto (DOT) deane-freeman.com...
> Hi Aaron,
>
> One other thing i forgot. You do have to go into the plugin via the
player UI
> to get the option to activate the event checker in the first place. Once
you
> have done that, it should persist across server restarts. Until you do
that, it
> does not monitor events even tho you have it checked in the web UI under
server
> settings->plugins.
>
> -kdf

azinck3
2006-02-14, 22:00
Just wanted to post that the eventual resolution to this was to not run slimserver as a service. I had to start it from the command line and it worked fine.

JJZolx
2006-02-14, 23:01
Just wanted to post that the eventual resolution to this was to not run slimserver as a service. I had to start it from the command line and it worked fine.
I take it rhapsody.exe connects to a service on the Internet? If you're running the SlimServer service under the local SYSTEM account instead of a user account, that would probably be the reason rhapsody.exe fails to work. When you launch the executable it runs under the same account, with the same permissions and same restrictions as SlimServer.

http://www.slimdevices.com/su_faq.html#troubleshooting-sharedvolume