NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
1 2 3 4 5 … 111 Next »
Probably for SUB?

 
  • 0 Vote(s) - 0 Average
Probably for SUB?
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#1
2026-04-18, 03:12 PM
I know you don't like getting involved with batch files, so I'm only including the command that's relavant.

"C:\Program Files\PuTTY\plink.exe" -ssh -pw ????? user@IPaddress ls "/usr/local/bin/  > /volume1/Volume_1/PostBatchLog.txt" > "C:\users\john\PostBatchLog.txt"

It's a simple command to output a directory from my NAS.

If I put this command in PostCancel.bat, and execute the batch file directly in windows, it works fine.
If I have it run automatically after canceling a recording it doesn't work.
BrettB
Online

Posting Freak

Saint Paul, MN, USA
Posts: 2,745
Threads: 173
Joined: Jun 2007
#2
2026-04-18, 05:41 PM
(2026-04-18, 03:12 PM)jrockow Wrote: If I have it run automatically after canceling a recording it doesn't work.

Why don't you post a set of logs (from the button on the settings page) covering a recording cancellation which you think is not working properly?
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#3
2026-04-18, 06:39 PM
(2026-04-18, 05:41 PM)BrettB Wrote:
(2026-04-18, 03:12 PM)jrockow Wrote: If I have it run automatically after canceling a recording it doesn't work.

Why don't you post a set of logs (from the button on the settings page) covering a recording cancellation which you think is not working properly?

The particular command I posted isn't acting on a specific  recording, it's just listing a directory on my NAS box.
I didn't want to post the contents of the entire batch file and make it more confusing.

It seems as though whatever mechanism sub uses for post processing, it doesn't like that command.
If he can't easily reproduce the problem I'll send whatever logs he wants.
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#4
2026-04-18, 07:16 PM (This post was last modified: 2026-04-18, 07:46 PM by jrockow.)
I just realized I added the PostBatchLog.txt twice.
It should have read"

"C:\Program Files\PuTTY\plink.exe" -ssh -pw ????? user@IPaddress ls "/usr/local/bin/ > /volume1/Volume_1/PostBatchLog.txt"

I'm guessing the problem has to do with the placement of the quotes?
I've tried several variations.
Bobins
Offline

Posting Freak

UK (North West)
Posts: 1,363
Threads: 145
Joined: Sep 2004
#5
2026-04-18, 10:25 PM
In the end postcancel.bat is just a batch file executed with the authority/permissions under which NPVR is running.
Your quotes placement looks fine to me for creating the output file on the NAS.
Key thing is any error messages when you say "it doesn't work" and contents of NPVR logs during the cancel process.

Ray
NPVR Version= 7.0.4.251215
AMD Ryzen 5 7600X + 16GB DDR5 in Gigabyte B850 Gaming Motherboard
Windows 11 Pro 64bit
TBS-6902 dual DVB-S tuner
TBS-6205 quad DVB-T tuner
500Gb System Disk (M2 Nvme SSD)
4Tb Media Store (2 x 2Tb M2 Nvme SSD Spanned)

Raspberry Pi3 B+, Pi4B (OSMC) & Pi5 (XBian) running Kodi v21.1
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#6
2026-04-19, 12:09 AM
Here are the log files.

The PostCancel.bat file only contains the line of code I posted.
After canceling a recording there is no PostBatchLog.txt file created.

If I execute the batch file directly in Windows the log file is created with the contents listing all the files in the  /usr/local/bin/  directory.


Attached Files
.zip   logs-20260418-2002.zip (Size: 260.34 KB / Downloads: 1)
BrettB
Online

Posting Freak

Saint Paul, MN, USA
Posts: 2,745
Threads: 173
Joined: Jun 2007
#7
2026-04-19, 03:57 AM
(2026-04-18, 07:16 PM)jrockow Wrote: I'm guessing the problem has to do with the placement of the quotes?
I've tried several variations.

(2026-04-19, 12:09 AM)jrockow Wrote: If I execute the batch file directly in Windows the log file is created with the contents listing all the files in the  /usr/local/bin/  directory.

I'm guessing that the problem is you are running NextPVR as a Windows service under LocalSystem and that you didn't properly set up plink.exe to run under the LocalSystem account as described here:
Code:
Pre-Accept the Host Key: Services run in the background and cannot answer the "Do you trust this host?" prompt. You must manually connect to the server once using plink or putty to cache the host key in the registry.
Note: Registry keys are user-specific. If your service runs as LocalSystem, you may need to export the key from HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys and import it into HKEY_USERS\S-1-5-18\...

They also recommend that you include the "-batch" flag to disable all interactive prompts, ensuring the process doesn't hang waiting for input.
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#8
2026-04-19, 02:36 PM (This post was last modified: 2026-04-19, 02:39 PM by jrockow.)
(2026-04-19, 03:57 AM)BrettB Wrote:
Code:
Pre-Accept the Host Key: Services run in the background and cannot answer the "Do you trust this host?" prompt. You must manually connect to the server once using plink or putty to cache the host key in the registry.
Note: Registry keys are user-specific. If your service runs as LocalSystem, you may need to export the key from HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys and import it into HKEY_USERS\S-1-5-18\...

They also recommend that you include the "-batch" flag to disable all interactive prompts, ensuring the process doesn't hang waiting for input.

I tried your suggestions but the result was the same. I wasn't quite sure where exactly to import the putty key?
I also tried the -batch option.
You're probably right about it being a key or permission problem.

I simplified the test command line again:
"C:\Program Files\PuTTY\plink.exe" -ssh -pw ?? ??@?? "echo "John Test" > /path/to/file.txt"
BrettB
Online

Posting Freak

Saint Paul, MN, USA
Posts: 2,745
Threads: 173
Joined: Jun 2007
#9
2026-04-19, 05:07 PM
(2026-04-19, 02:36 PM)jrockow Wrote:
(2026-04-19, 03:57 AM)BrettB Wrote:
Code:
Pre-Accept the Host Key: Services run in the background and cannot answer the "Do you trust this host?" prompt. You must manually connect to the server once using plink or putty to cache the host key in the registry.
Note: Registry keys are user-specific. If your service runs as LocalSystem, you may need to export the key from HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys and import it into HKEY_USERS\S-1-5-18\...

They also recommend that you include the "-batch" flag to disable all interactive prompts, ensuring the process doesn't hang waiting for input.

I tried your suggestions but the result was the same. I wasn't quite sure where exactly to import the putty key?
I also tried the -batch option.
You're probably right about it being a key or permission problem.

I simplified the test command line again:
"C:\Program Files\PuTTY\plink.exe" -ssh -pw ?? ??@?? "echo "John Test" > /path/to/file.txt"

Based upon the instructions, you would import it into HKEY_USERS\S-1-5-18\Software\SimonTatham\PuTTY\SshHostKeys. Is that where you tried? And did get the correct key for the host that you are trying to connect to?
jrockow
Offline

Senior Member

Posts: 746
Threads: 118
Joined: Nov 2005
#10
2026-04-19, 06:49 PM
I copied the keys as per instructions. Still no go.
Just curious; did you try to duplicate my problem?

It's just a 1-line PostCancel.bat file; start to record a program then cancel.
(2026-04-19, 05:07 PM)BrettB Wrote: Based upon the instructions, you would import it into HKEY_USERS\S-1-5-18\Software\SimonTatham\PuTTY\SshHostKeys. Is that where you tried? And did get the correct key for the host that you are trying to connect to?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode