I've set up a rather complex script to run as PostProcessing.bat. It basically extracts closed captions as an SRT file, compresses the TS file to MP4 with subtitles, uploads the resulting file to an FTP server and moves everything to a NAS when done. This all happens in the background because I've found no way to bring up the CMD screen while the processing is being executed. Is there a way to either show that screen and close it when all is done, or at least log everything into a LOG file?
Thanks.
dixxfixx Wrote:... I always thought it showed unless you did something special to prevent it.
PostProcessing and other batch files run in the context of the Recording Service under the System user account. The System user account has no "connection" to the console screen so nothing is displayed.
I expect that you can do "nrecord -RUN" to get the recording serviice running in the logged on user account for testing purposes. I have always used console redirection to a log file to see what going on in batch files. Or you can create a batch file that calls the postprocessing batch file and passes the same params as nrecord would pass.
Thanks, Graham! See? That's what I mean by "someone good at it".
dixxfixx Wrote:Thanks, Graham! See? That's what I mean by "someone good at it".
More like "someone too good at it"
Thanks Graham! That's pretty much all I needed to know.
I've run round this circle in the past - debugging scripts run under the SYSTEM account......
You can use PsExec to open a CMD window as the system user and manually run your batch files as this user to see what is going wrong. (usually permissions or ownership) available from
https://technet.microsoft.com/en-us/sysi...97553.aspx
Code:
C:\Users\martin\Desktop>psexec -i -s cmd
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - [url]www.sysinternals.com[/url]
This will open another cmd window
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>whoami
nt authority\system
C:\Windows\system32>
Use caution when redirecting console and error output to a log file since multiple postprocessing.bat scripts could run in parallel.
Martin