Sunday, June 29, 2008

Cannot see shared folders or mapped drives on XBox 360's Media Center Extender that are visible on the Vista Media Center PC

On my Vista PC named Jupiter and running Media Center, I logon as Alin and I am able to see shares from another computers (e.g. from a Linux box that is my NAS device). Some of these drives are mapped to local drives on my account, e.g. M:\ -> \\nas\media\music

I setup my Xbox 360 as a Media Center Extender, however when I go to the Library setup and I try to add a new folder to the library, I am no able to select the shares from my NAS device: in the local drives I only see the C:\ drive, and in the folders shared by other computers I don't see the shares from the Linux box...

Media Center Extender uses a local username named something like MCX1 on the MC PC. It is for this MCX1 user that you have to map a drive to the shared folder to make it appear in the Library as a local drive... This can be done with a NetLogon script.

Start by creating a folder %Windir%\System32\Repl\Import\Scripts. Now create a batch file, where you map the drives.  An example might look like this:

    @echo off
set CREDENTIALS=/user:LinuxBox\[Username] [Password]
net use P: "\\LinuxBox\media\Pictures" %CREDENTIALS%
net use M: "\\LinuxBox\media\Music" %CREDENTIALS%


Save this file in the folder you created earlier, e.g. as MCXLogonScript.cmd. The location is important. I've read articles this logon file should be placed in C:\netlogon; the help mentions it should be saved in \\vistapc\netlogon share, etc., but none of those worked for me. I found the correct path where Windows was looking for the file with ProcessMonitor, and that path on my Vista box was %Windir%\System32\Repl\Import\Scripts.



It's time to associate the logon script with the MCX1 user.  Go to Control Panel -> Administrative Tools -> Computer Management. Under SystemTools/LocalUsersAndGroups/Users, select the MCX1 user and display its Properties. In the Profile tab, type just the file name, MCXLogonScript.cmd.



mcxlogonscript



Go to the XBox 360. Close and reopen Media Center here - it will logout and re-login on the PC with the MCX1 user, and this time it will read the logon script and map the drives. If you go now to Tasks/Setting/LibrarySetup and choose AddFoldersToWatch and select AddFoldersOnThisComputer, now you should see the M:\ and P:\ drives that were mapped by the logon script beside the C:\ drive.

3 comments:

Anonymous said...

Thanks for this post, a life saver

Unknown said...

Thanks for this. I have a permutation of it that I was using but on a rebuild of my media center it stopped working. Hopefully this works. So you do not share the scripts folder as netlogon or anything?

Also who do you give access to the scripts folder to? Oddly in Windows 7 I created the folder but then couldn't save the cmd file in there as didn't have permission and had to manually add myself, the one who created the folder in the first place, to write in it.

Alin Constantin said...

@Steve: I haven't use Vista or Win7 for a couple of years now, but as far as I remember I was not creating netlogon shares. I use accounts with Admin privileges and I don't remember having to set permissions. Sorry I can't help more, since then I changed both the OS 3 times, and the NAS (to one that knows DLNA, and now I can see the media folders directly on Xbox/XBoxOne)
I suggest searching the net for "System32\Repl\Import\Scripts", perhaps one of the other mentions of it provides more info.