NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 32 33 34 35 36 … 433 Next »
Run custom .bat file at start and end of recording

Run custom .bat file at start and end of recording
bm_00
Offline

Junior Member

Posts: 7
Threads: 3
Joined: Jan 2019
#11
2019-01-08, 09:37 PM
The light and script work perfectly with the test
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#12
2019-01-08, 09:47 PM
bm_00 Wrote:The light and script work perfectly with the test
Great.

Unfortunately it sounds like whatever you're trying to run in your script doesn't play nicely when run from a different account. It probably is something like I mentioned earlier, with the utility trying to talk to something else using WM_COPYDATA.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#13
2019-01-08, 10:56 PM
You might try redirecting the output of your commands to a text file. That way you might be able to determine where things are going wrong. There are some examples on the wiki, or if you attach your .bat file to a post, I suspect we can help with some logging...
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#14
2019-01-10, 03:46 AM
bm_00 Wrote:I have tried modifying the service but when I both type in and search for the correct username and enter the correct password and try to restart the service it throws an error of 1069 login failure. Research shows that usually means an incorrect password but it is the right one as its the same I use to login

The account may not have the "logon as a service" privilege. If you have windows pro you can set that by running secpol.msc; it's under Local Policies->User Rights Assignment. No idea if you can do it with Windows Home... I don't have it, never use it.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
scJohn
Offline

Senior Member

Posts: 281
Threads: 41
Joined: Jun 2013
#15
2019-01-19, 08:18 PM
I was writing script files to transcode (using ffmpeg, Handbrake, qsvc, or Divix) the just finished show. I was running into a lot of problems with not having the "right privilege" to do things. I gave up on CMD(aka .bat files) and switched over to Powershell. Problems went away because PS has the commands to give you the "write privilege" and is just more robust with the the things that you can do. I rewrote all of my .bat file to .ps1 files.

Sub. In version 5.0, could you give us the option of having NxtPvr call postprocessing.ps1 instead of postprocessing.bat.
Server:
CPU- Intel I5-8400, Ram -12GB, SSD - 128GB, HDD - 1TB, Turners - Hauppauge WinTV-quadHD, OS - Win 10 Home, Router - TP-Link Archer C7(AC1750).

Clients:
Intel NUC CPU - Intel N3700, RAM - 4GB, SSD - 128GB, OS - Win 10, Wired Ethernet.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#16
2019-01-19, 08:57 PM
scJohn Wrote:Sub. In version 5.0, could you give us the option of having NxtPvr call postprocessing.ps1 instead of postprocessing.bat.
From what I've read after a quick google, you can run your powershell scripts from a batch file.
scJohn
Offline

Senior Member

Posts: 281
Threads: 41
Joined: Jun 2013
#17
2019-01-20, 06:00 PM
True.

Here is an example of the code

Code:
PowerShell -NoProfile -ExecutionPolicy Bypass  -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -WindowStyle Minimized -File """"%DIRLOC%Scheduler.ps1"""" """%ARG1%"""  """"%Run%"""" ' -Verb RunAs}"  >> %LOGFILE%

With version 5.xx, maybe it's time to say good bye to .bat files. Microsoft will never pull CMD from Win 10 but at the say time they are no longer maintaining it. Just something to consider. I would just prefer not to have the intermediate step.
Server:
CPU- Intel I5-8400, Ram -12GB, SSD - 128GB, HDD - 1TB, Turners - Hauppauge WinTV-quadHD, OS - Win 10 Home, Router - TP-Link Archer C7(AC1750).

Clients:
Intel NUC CPU - Intel N3700, RAM - 4GB, SSD - 128GB, OS - Win 10, Wired Ethernet.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#18
2019-01-20, 09:29 PM
scJohn Wrote:With version 5.xx, maybe it's time to say good bye to .bat files.
Ultimately there is already lots of people with batch files, so no point in breaking that for them. I could investigate looking optionally letting users use powershell scripts though.

On Linux it looks for .sh scripts.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,549 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 998 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,076 2023-11-20, 03:42 PM
Last Post: sub
  incorrect frequency in adelaide .ini file spin35 5 3,035 2023-02-01, 05:40 PM
Last Post: sub
  Recording to a network drive woes. 2leftfeet 12 7,193 2022-04-05, 08:03 PM
Last Post: mvallevand
  All my recordings start 90 sec early ncsercs 2 1,360 2022-03-19, 03:28 AM
Last Post: sub
  device needed for recording David209 2 1,734 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,269 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,038 2021-03-27, 03:23 PM
Last Post: Jean0987654321
  ts file shows length too long? SuttonWillow 2 1,910 2021-03-15, 01:56 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode