RSS - Ian's Blog RSS - All content RSS - The Media Center Show Subscribe via iTunes  Subscribe with Zune Twitter
mControl for Windows Media Center

Storing or Recording Live TV to WHS

  • 07-23-2008 4:52 AM replied on

    Re: Storing or Recording Live TV to WHS

    Jacks5000:
    I have tried your program, but I still got to untick permission every time I reboot my WHS . .Have you left something out of the batch file

    I've noticed this behavior as well, but it seemed to happen inconsistently. I noticed that while the share permissions were correct, the files in the share still had the original permissions set by WHS.  I had unchecked the "allow inheritable permissions..." box, but I still had periodic problems.

    My best guess is that the process resetting the share permissions upon boot is resetting this flag. To deal with this, I added two additional flags to the cacls command.  The first, "/T" re-propagates the Everyone/Anonymous permissions to all of the files in the share.  The second, "/C" tells the cacls command to keep going even if it runs into an access denied error (this could happen if a file is in use).

    I also found that the 60 second delay wasn't always long enough, so I increased the delay to 120 seconds.  Here's the complete updated script (changes are in bold):

    @ECHO OFF
    "C:\Program Files\Windows Resource Kits\Tools\sleep.exe" 120
    net share "Recorded TV" /Delete
    net share "Recorded TV"="D:\Shares\Recorded TV" /GRANT:Everyone,FULL /GRANT:"Anonymous logon",FULL
    ECHO Y| cacls "D:\shares\Recorded TV" /G "Anonymous logon":F "Everyone":F /T /C

    Please note that this should only be used on the "Recorded TV" share.  Since the command now resets the permissions on all the files in the share, this could take quite a long time on a share that has a lot of files in it.

    Also, it may be worth noting that I am not recording directly to the WHS.  My Media Center is recording to a local disk, and those files are being moved over to my WHS periodically by the "Recorded TV Manager" WHS Add-in from Drasch Computer Software. You have to sort out your permissions on the Media Center to allow the WHS to access its shares, but I found that to be a good solution for me.  The software is $25, and well worth it IMO.

    Hopefully this will sort things out on your system.

(c) Ian Dixon 2008