Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat method: Custom application not working. #385

Closed
ilya-lesikov opened this issue Jan 1, 2017 · 4 comments
Closed

Chat method: Custom application not working. #385

ilya-lesikov opened this issue Jan 1, 2017 · 4 comments

Comments

@ilya-lesikov
Copy link

I use Chatty, but wrapped it in .ps1 script just to hide a few interface elements on Chatty startup (the only way I found). But for some reason nothing passed to "custom chat application command" field in the chat settings does not getting executed when I'm trying to open chat ("chat method: chatty" works perfectly however). Tried 'C:...\powershell.exe ...\chatty.ps1 args', even tried to open cmd.exe with full path to it and without any arguments - doesn't work.

streamlink-twitch-gui 1.0.0 from chocolatey, win10 (default system language is russian).

@bastimeyer
Copy link
Member

Can you please post the whole line, so I can see what's wrong? If it contains sensitive data, just replace it...

@ilya-lesikov
Copy link
Author

ilya-lesikov commented Jan 1, 2017

tried this (square brackets mean tried with and without this string):
[C:\Windows\System32\WindowsPowerShell\v1.0\]powershell[.exe] [-file] C:\scripts\chatty.ps1 [-channel lirik]
even these two don't work:
[C:\Windows\System32\WindowsPowerShell\v1.0\]powershell[.exe]
[C:\Windows\system32\]cmd[.exe]

All of the above works from powershell/cmd/Win+R.

Thanks.

@bastimeyer
Copy link
Member

Don't confuse the input in the GUI settings with a shell. The custom chat string is just being parsed as a executable-path and parameters (in posix style). All the GUI does is resolving the file by looking into the PATH env var if it is neither absolute or relative, there is no filename extension expansion (PATHEXT).

I'm not familiar with Powershell and Windows batch scripting, but running cmd.exe /c explorer works, so I don't know what's happening on your system.

Running

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\scripts\chatty.ps1 -channel "{channel}"

will result in these exec and params values

exec = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe";
params = [
  "-File",
  "C:\scripts\chatty.ps1",
  "-channel",
  "CHANNEL"
];

which is the correct behavior.

@ilya-lesikov
Copy link
Author

ilya-lesikov commented Jan 1, 2017

Yea, cmd.exe /c explorer works.
After messing around a little turned out PS in GUI works correctly only if invoked with cmd.exe /c "powershell .\myscript.ps1".
Thanks for help, closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants