2021-01-29, 01:14 PM
Did that specific command work and do you see it flash?
Martin
Martin
2021-01-29, 01:14 PM
Did that specific command work and do you see it flash?
Martin
2021-02-11, 06:53 PM
(This post was last modified: 2021-02-11, 06:59 PM by chef Paula.)
Hi, sorry for delay, life got in the way of tech missions for a few days.
So, where i'm at is , that the drakeblast powershell script works. For example the line you've quoted above in your question "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\winLIRC\Drake.ps1 1 2" does blast correctly, and change the stb to channel 12. This works on win7 (my original TV Server PC), and on win10 (My dad's TV server PC). However, on windows 7, i can set the blaster executable for all channels to be "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" and the blasting arguments to be "-File C:\winLIRC\Drake.ps1 1 2" (i think that's the syntax that worked) and Next PVR (version4.2) sucessfully changes the STB channel, in this example, to channel 12. all good. However, on my dad's win10 machine, i can not for the life of me get NextPVR to send IR blasts when configured exactly the same. (However i CAN succesfully change channels on Win10 using drakeblast script via command prompt tho!). So, to make experimenting/testing etc, easier, i decided to give my own TV server machine the long overdue win10 upgrade. (clean install actually,, not realy upgrade). And, as expected, same problem. So, i thoroughly made sure that i've done/installed/enabled all the same things as i had on the working Win7 setup (eg: Power shell scripts enaled, telnet installed/enabled/tested, firewall rules made the same, possibly irrelevant WinLIRC registry entries copied over - they were never isntalled by winLIRC but were grafted from a website while trying to get it working on win7, and as they're on the machine that works, i thought it makes sense to put them on the win 10 setup too.). Still, on Win 10, NextPVR doesn't call the drakeblast script and actually do any blasting (no red flash). So, i thought, "what if win10 treats NextPVR differently somehow than win7 does?" Seems logical. So, i changed the executables in NextPVR's program files folder to run in compatibility mode for Win7. Still no joy. tried them in compatibility mode for win7 AND "run as administrator option ticked". Still no difference, so i can use winLIRC manually on Win10, and i can use it via drakeblastscript at command prompt, but can't use powershell.exe as the blaster executable. OK so that's my stall point. Had a day off, wached tv directly from the stb (without my TV server), stopped thinking about it and got baked. ...And then i realised... NextPVR requires an executable for blasting, and it isn't calling powershell. ok. but i can call drakeblast and succesfully change channel by typing a line on command prompt and adding a few digits to it (eg "cd \Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\winLIRC\Drake.ps1 4 4 4" actually changes the stb to the syfy channel), so i thought, surely i can make that command into a batch file, right? and just make one batch file for each channel that i use on the STB, and set that batch file as the executable for the channel??? So for example i could make a batch file for the syfy channel (channel 444) that would llo like: @echo off cd \Windows\System32\WindowsPowerShell\v1.0 powershell.exe -File C:\winLIRC\Drake.ps1 4 4 4 exit and that could be saved as "444.bat" and that gives me a channel changer for one channel. So i double clicked on my batch file, and what do you know? it worked! Happy days, i 've cracked this! (or so i thought!!!). I then made 100 batch files (one for each channel i use). Cool. problem solved, so back into NextPVR to set the blaster executables for each channel individually, and disaster strikes!!! NextPVR won't take a bat file in the box where you select channel changer executables, has to be an.exe file. DOH!! I ALREADY KNEW THIS!! IDIOT! spent hours making useless batchfiles!! So, back to sulking and smoking for a while, until i stumbled accross a bat to exe converter, so an hour or 3 later, i now have 100 small ".exe"executable files in my winlirc folder and have configured them in NextPVR, so i finally have NextPVR (in win10) changing channels on my STB succesfully, using WinLIRC, via the drakeblast powershell script!! My channel changer bat files have evolved a bit too, it's starting to look more like this now: @echo off cd \Windows\System32\WindowsPowerShell\v1.0 powershell.exe -File C:\winLIRC\Drake.ps1 exit timeout 1 /nobreak powershell.exe -File C:\winLIRC\Drake.ps1 4 powershell.exe -File C:\winLIRC\Drake.ps1 4 powershell.exe -File C:\winLIRC\Drake.ps1 4 exit (that's for channel 444 on the stb) Evidence of improvement is anecdotal at the moment, as i've not done hudreds of channel changes yet, but that last version of the batch file seems (i only say seems at this point) to be spacing out the blasts better, to avoid the frequent "double bounce" i was getting, although the improvement could also be due to tweaking the blaster placement slightly. Also, i've added a line to blast the "exit" button first, before blasting the numbers, as the stb box is occasioanlly used for VOD, and if it's in the VOD section, it ignores the channel numbers being blasted to it, so by blasting "exit" button first, i can make sure the box is back in SatTV mode before it receives the channel change. (I'm also thinking about creating a dummy channel in NextPVR that would trigger a blast of the stb's power button twice, just to quickly reset the stb if it's crashed). None of this would be possible at all, and i'd still be tearing my hair out over how to send blasts to WinLIRC if it weren't for you knocking up the drakeblast powershell script Mr Mvallevand. Thank you very much. If you have any improvments or suggestions to offer i'd be very grateful, as i've literally botched this together in the most amateurish way possible. Thanks Mvalleland, and everyone who chipped-in.
2021-02-11, 07:03 PM
If it works from the command line it still sounds like you need to Windows Powershell exception on the local system users account.
Martin
2021-02-11, 07:18 PM
(This post was last modified: 2021-02-11, 07:23 PM by chef Paula.)
wow. the penny just (very slowly) dropped. You probably heard it all the way across the pond in Canada. NextPVR's recording service is local system user, BUT, anything i do at command prompt (even without right-clicking and "run as admin") is me (ie: an Admin account) and this includes the exes i created to open a command prompt and input a a blasting command. Even though they're being called on by NexPVR's recording service, they're opening (invisibly) a command prompt and inputting the powershell blasting command as if they were my (admin) account? am i right?
and yet when NextPVR has powershell.exe as the blasting executable, NextPVR recording service (which runs as local system user) is calling powershell.exe as local system user. Am i following you right? ..And by default a local system user doesn't have permission to call on powershell.exe because it's in a subfolder of: "C:\windows\system32\somepowershellfolder\etc\etc" (and any executables in system32 can't be opened without being an admin user? am i still following te right reasoning?
2021-02-11, 07:21 PM
Administrator is not the same as local system. Did you trying using the exception parameter I gave you earlier?
Martin
2021-02-11, 07:25 PM
I'm gonna go back a page or two and find it. Out of curiosity tho, is my reasoning for why you said "If it works from the command line it still sounds like you need to Windows Powershell exception on the local system users account" correct?
2021-02-11, 07:28 PM
2021-02-11, 07:38 PM
I would try it. You can alos get a local system command prompt with a program called psexec from Sysinternals
psexec –i –s cmd Martin |
|