How to install SelectEx

You probably don't have permission to write to C:\ root, that's new in recent windows versions if you don't run things in "admin" mode and even then it can happen unless you change file-access permission on root folders.
So writing to C:\ probably failed because of that.

Writing to /desktop failed, because placeholders/aliases passed to TOFILE are not resolved currently by SelectEx..
But we can easily fix that, by resolving /desktop ourself before passing it to SelectEx:

@script jscript function OnClick(data) { var cmd = data.func.command, tab = data.func.sourcetab; DOpus.Output("path: " + tab.path); cmd.RunCommand('SelectEx PATH="'+tab.path+'" RANDOM FOLDERS ITEMCOUNT=10 SETVAR=SelexResult'); var folders = (""+tab.vars.get("SelexResult")).split("\n"); for(var f=0;f<folders.length;f++) cmd.RunCommand('SelectEx LINEAR FILES ITEMCOUNTPERC=100 '+ 'PATH="'+folders[f]+'" '+ 'TOFILE="'+DOpus.FSUtil.Resolve("/desktop\\MyPlayList.m3u")+'" APPEND'); }
Consider adding the *.dcf button provided in the thread below (it's right at the top).
Click it and choose "dump" to make SelectEx spit out more information in case it still struggles to create the playlist file.
It actually should have printed a warning or something if it failed to create the file, so I currently can't say what's wrong, but the resulting trace in the script-console should reveal the cause.
XLog: Helper: XLog (versatile logging approach for DO scripting)