Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: PostProcessing.bat not executing

  1. #11
    Join Date
    Dec 2014
    Location
    USA
    Posts
    9
    Appeared "Plex media scanner.exe" doesn't like being triggered from a service. Terminates prematurely before finishing. It works perfectly fine if postprocessing.bat is executed by the user.

    Was using notepad.exe as a way to test getting it to run as a user instead of a background service. Is there a script command to call another .bat script but executed as a desktop user?

  2. #12
    Join Date
    May 2006
    Location
    Canada
    Posts
    29,174
    If the command line doesn't work for you I'd just following this https://support.plex.tv/articles/201...-url-commands/ and this linked post https://support.plex.tv/articles/204...-x-plex-token/ and issuing this

    Code:
    curl http://localhost:32400/library/sections/1/refresh?X-Plex-Token=YourTokenGoesHere
    Martin

  3. #13
    Join Date
    Dec 2014
    Location
    USA
    Posts
    9
    I figured out the problem and fixed it. Posting an update for others that might have the same issue.

    PostProcessing.bat is properly triggering. The reason why "plex media server.exe" terminates prematurely is because it could not get access to my mapped network drive. Even doing change directory to the map drive fails.

    Even though I've set NPVR Recording Service to use local desktop user account instead of "local service" account the launched commands still get executed under a non local user account. My mapped drives are associated with my local user account. It is not visible to other accounts. Logging the output of "net use" command in the PostProcessing.bat shows that my mapped drives are always in an "unavailable" state. This is the same issue people run into when executing script command under different credentials like using "run as admin" mode etc.

    After updating from Win10 LTSC 1507 to 1809 I had this issue which wasn't a problem prior.

    To work around, I remount the drive mapping with "net use <drive:> //unc_network_path" command as the first line of PostProcessing.bat. This allowed the rest of the script to function and have access drives.
    Last edited by MiyoshiSaki; 2019-09-03 at 07:39 AM.

  4. #14
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    91,220
    Great - glad you got to the bottom of it. (and glad I can continue to tell people that Postprocessing.bat is definitely being executed )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •