Monday, August 11, 2008

Giving a Media Center Extender access to files on another device (NAS, WHS, Computer) through the Media Center using custom username and password

Requirements

  • On Vista and Windows 7, right click and choose Run As Administrator or the tool will not work (unless you have disabled the UAC).
  • Run this tool on the Media Center computer.

Downloads

Description

I started creating instructions similar to:
But I decided to try a different route. This time I wrote a program to do the work.
 

 
This tool needs to be run on your Media Center PC. Note - You only need to run it once to get everything setup. If at a later time you add another share or device, you can run it again to updated the login scripts.

It can allow your Media Extenders to access other network devices that are sharing files. This includes NAS, Windows Home Server, or another PC (XP or Vista). It works by created login scripts for Media Center Extender accounts on the Media Center that connect to the devices using a different account - one that you specify. Create the account on the other device(s), add it to the shares and then run this tool. This tool works differently than the 2 links above in that it uses a separate account with password to gain access to the shares. The above 2 links describe giving access based on 'all access permissions' like Guest and passwordless public sharing. With this tool, the above two link are somewhat obsolete. Why not just use an account for sharing instead of opening up shares to Guest or Anonymous? This has been tested with MyMovies and Transcode 360.

This tool requires you have .NET Framework version 2 installed for it to work.
Finally, use the tool at your own risk. It is a simple tool. It does not delete anything. It shouldn't mess anything up. But, I don't make any guarantees about this tool.

More Information

Please see the comments section for some questions and answers.

103 comments:

toby said...

I see the tool is being downloaded (thanks Google Analytics). It would be nice if someone would comment back and let me know everything worked ok. It worked for me but I haven't had any word from anyone else. Thanks.

Mr. Zardoz said...

I tried the tool with my Vista Ultimate system.

Two glitches:
1) the Script View does not properly display the generated lines
2) the target folder is not correct for my Vista computer.
- Program tried: C:\Windows\System32\Repl\Import\scripts
- Should be: C:\Windows\System32\GroupPolicy\User\Scripts\Logon

toby said...

Can you be more specific in what was not displayed properly in the script view?

The directory I choose should work, although other directories could have been used. No, that directory doesn't already exist on Vista Ultimate, but the tool will create the directory and put the script there. The tool uses the Net User command to associate the logon script with the account. The default location for Net User is the path I used. I did my testing on Vista Ultimate 32-bit. I am curious to know if it did not work for you in its current form.

jpsit said...

just downloaded this wonderful utility... my media centre pc (vista ultimate) is connected to a domain. Bought myself an xbox today at the new prices - but no media in its library from the server... will let you know how I fare with this. Thanks toby!

Anonymous said...

Thanks for this little app. I thankyou for doing it.
I downloaded and added my links, tested and then i found like Mr.zardoz, that if you moved the mouse from the build button the info in the window would disappear. I also found that the program wouldnt create the Repl etc.. file so i created it. then it wouldnt add the login script, ( error 5 ) ?? access denied.

toby said...

I'll take a look at the code now that I have more specific information to go on...I'm wondering if the access denied errors can be attributed to not running the application 'as administrator' with the Vista UAC enabled.

toby said...

Hey Anonymous poster, can you email me aamjohns@[nospam].yahoo.com? I am having trouble recreating your error and I would like to correspond with you.

Anonymous said...

HI Toby, Sorry as always one should ready all the instructions. After rereading and running the program as an Administrator it worked

Sorry to do that to you

toby said...

Actually, thanks to your post (feedback) I updated the instructions last night and added the line about running as admin. So no fault of your's. I am still concerned about the report of the text disappearing. That is really strange because I cannot think of anything in the code that would cause that. Unless it is something related to .Net and Administrator rights. Thanks again. I see the tool has been downloaded over 50 times but what you see here is all the feedback I have gotten so I obviously want to make sure it is working right for people. Maybe someday someone will post 'worked great'! :)

mrjlturner said...

It worked Great! I'm not just saying that because you asked that someone did...but it actually worked "as advertised!" Thanks for the cool tool!!!!!

toby said...

Mr. Turner,
Great. I'm glad it is working as expected. I appreciate you letting me know.

Thanks,
toby.

culby said...

Toby
Thanks for the tool unfortuantly, ive not been able to get the process working for remote content, although local content works great. I have xpmce with two linksys extenders and three vmc (two home prem, one ultimate) with one linksys extender and one xbox 360. I finally got the vmc seeing the mouned drives but even though I can search the drives for my dvd library and set it up as a monitored folder, I cant get either one of the vista extenders play movies through my movies. They say can find z:/movies/(Moviename). Ive been working on this for three days and would love someones input.

mrjlturner said...

Culby,
Here's the trick buddy...Ensure that you change the "Windows Media Player Network Sharing" Service to run with credentials that have access to your remote shares. By default, it runs as local system, which of course doesn't have rights to shares that are external to the pc that runs Media Center. Once you change that, you should be able to watch videos on your extenders that are located on shares.

thanks,
jt

toby said...

Culby,
From what you wrote, the error indicates what the problem is...It is using a 'local' path. Your movies have to be in the MM database using a UNC path, not a drive path. I describe this on the blog (I've got so many posts I'm not sure which one's talk about this at the moment). This is also described in the multi-zone document on the MM website. Even if the extender is mounting the drive with a letter that matches what you added in the database, it won't work.

For a test, add a movie. When you browse for the location of the movie, instead of browsing to the movie on it's drive, choose to look in Network, browse the machine that has the movie and browse to the folder containing the movie. This will give you a path that looks like this \\computer\Movies\movie_folder. Rather than Z:\Movies\movie_folder

I don't know if this is confusing or not. Even though you are browsing on the same machine as the movie, you still have to browse like you are accessing it over the network, so the movie's path is in the correct format.

You can also try what Mr. Turner said.

Try it and let me know.

John said...

This worked really well! Thanks so much for the app! Only thing that took me a little while to work out was that you have to run it directly on the media center PC (not from a shared drive - my home server) otherwise it stops responding before launching. A minor glitch in an otherwise excellent tool! Thanks again!

John said...

Spoke too soon... when I checked the success of this I went directly to the Music on the Media Center - everything looks great. However, since then, I went to check out my photos, and I get a problem. I can see all of the folders that my photos are organised in just fine, but none of the actual files are visible. I have tried removing and re-adding the folder watching and increasing the permissions to full access on the Home Server, but neither made any difference. The only thing I notice is that the MCX has created a folder to watch itself (MCX1/Music) which I assume is the login script working - but I don't get corresponding folders for MCX1 relating to Photos and Videos. Is it possible that only the first script is running?

Anonymous said...

Just wanted to say thank you for creating and sharing this utility. It works great

Mike said...

It worked a treat. Thank you for taking the time to build this tool and publish instructions etc.

toby said...

Awesome. Glad to hear it worked for you.

toby.

Simon said...

Hi, great effort and a good tool for vista.

With regard to WHS, just enable the guest account and you will see all files ... lacks security but hey, thats life !

toby said...

Hi,
I appreciate the comment. If you look at my blog I go all through that. The purpose of this, and this tool, is for situations where you cannot use guest accounts. For example, some NAS will not allow any account that does not have a password. So, this is the solution for those situations. I did not intend for this to supplant easier solutions. And, like I said, if you look at my blog I have a whole post on guest account sharing.

backwar said...

Thank you for that absolutely fantastic tool.

It worked as advertised without any issue.

toby said...

That's awesome. Glad to hear it!

larsnorpchen said...

Works with the Windows 7 Beta as well. Thanks!

EPD said...

Hi Toby,

Just downloaded the script tool. It worked great the first time I tried! Thank you very much for taking the time to create such a useful program!!

Eric

gwyn said...

I am trying this in Windows 7 RC1 and getting a 'System error 86"..." The specified network password is not correct".

I've tried this with several accounts on my NAS all with the same reult. Any ideas what I might be doing wrong?

toby said...

Hi gwyn,
I'll suggest something and if it doesn't work please email me at aamjohns@yahoo.com? I haven't tested the tool with Windows 7 but I don't see any reason why it shouldn't work.

When you use the tool, are you getting the error 86 when you click the Test button? Have you tried just doing a mapping on Windows 7 to the share on the NAS? Does that work?

You should be able to right click 'Computer' and choose Map Network Drive. Put in the username and password that you have setup on the NAS for the shares on the NAS. If that works, go back to Computer, right click, and choose disconnect network drive. Disconnect the mapping you just did and try the tool again. Use the same username and password. Let me know how it goes.

toby said...

Gwyn,
Also, double check your NAS. Make sure sharing is setup properly for the accounts you are testing with.

Dan said...

I just tried your little app to create the login script and whatnot on Win7 Ultimate x64 RC1 (7100). Much to my surprise, it worked! Not that I didn't trust your coding, I just thought Win7 would break something. Good job! Thanks :)

toby said...

Dan, that's good to know. Thanks for the confirmation.

José Andias said...

Great tool: simple but good engineering.
Worked clean here and solved my problems.
Congratulations and thank you very much!

toby said...

Thank you very much. I'm glad to hear it worked for you.

I'm in the process of making a t360 installer 'tool'. Basically it'll just install, and do some of the other stuff for you. So for a lot of people they won't really have to read through the instructions and do all the steps, the tool will do it for them (ie: running the regedits, updating mencoder).

Jerry Kurtz said...

Windows 7 Home Premium X64 RTM doesn't have a system32/repl folder, so the tool fails to create the batch files.

Any idea where they should go?

toby said...

I have Windows 7 Enterprise RTM and I just tested my tool and it worked.

I want to know if you actually used my tool, or if you went looking for those directories and didn't see them so you assumed it wouldn't work? If the directories don't exist, the tool should create them and place the batch file for you. Just because it is not already there does not mean it will not work.

Sure, there's other places you can put the batch file. Run gpedit.msc and expand user configuration>windows settings>scripts>logon. Click show files, paste the scripit, close that windows, click Add, choose the script. Any time an account logs on the script will run.

You can go back to the comments like where Mr. Zardoz said I was wrong. Well, not exactly. It's more like we are both right. Like I said, just because the directories are not already there doesn't mean it won't work. I'll paste a screen shot on my blog. Have a look.

toby said...

Link:
http://tobias-tobin.blogspot.com/2009/08/blog-post.html

If you continue to have difficulties let me know. Basically you just need to make the batch file and put it somewhere it'll get run when the account logs on.

toby said...

I just dug up the source code for that program and reviewed it. And yes, it creates those directories starting a Repl if they are not there. And the reason I put that in is because different flavors of the OS either have it or they don't. So, again, just because it was not already there does not mean it will not work.

If it does not work, I'd like to know. I'd also like to know how this all came about. Whether my tool failed to created the directories (which would happen if you did not choose to 'run as administrator'), or if you went looking for them yourself.

Feel free to clue me in.

Jerry Kurtz said...

The directories were not there and the tool got an error (red message at the bottom of the screen) when it tried to create them - but probably because I didn't 'run as administrator' (duh!).

So, I went in and created the directories manually, created the .cmd file with the generated text (named "Mcx1-HTPC.cmd")

Does your tool map the user account to a logon script, or is that Repl/Scripts some kind of magic folder?

I'll try running the tool under 'run as administrator'.

I'll also see if this version of Windows 7 has the group policy editor snap-in you mentioned in a previous post (I didn't think of running that tool manually). If that tool is there, I should be able to manually map the logon script.

toby said...

It shouldn't be too complicated. Run the tool as administrator. Click the checkbox(es) for the extender account(s) you want to give access to, specify the account you want them to use, specify the network paths you want them to have access to. Click Test. If they pass the test click build. Then finish it. You should be good to go.

If you didn't run that app as admin, it would not have had the necessary permissions.

Jerry Kurtz said...

Running as Administrator appeared to be my fix - thanks for the help and the useful utility.

N8WEI said...

Hello Toby,

I downloaded your tool and it appeared to work just fine. I really have no way to know if the login scripts are working or not, but I'll get to that in a minute.

First... I would like to note that I always rename the local administrator account on all of my machines only use it when absolutely necessary. I then create a secondary account, add it to the Administrators group, and use that whenever administering the machine.

For some reason, that secondary administrator account did not have enough access to create the folders. I found that strange, but I figured I would report that here in case anyone else has a similar problem.


Now... I had set up login scripts for the MCE users manually in the past, but was having issues, so I figured I would try your tool to see if I just missed something simple.

My old (manual) configuration consisted of a C:\NetLogon folder, with scripts for various users in it. I simply used the "Local Users and Groups" tool under Computer Management to set the logon script for each user.

Your tool seems to want to put this somewhere else (system32\repl\import\scripts). It's been a long time since I brushed up on my NT Admin skills, so I was relying on documentation that I found. The documentation I found was that everything had to be in the NetLogon folder in order to be found during the login process. Can you elaborate? I'd like to know for sure what is correct, because I have login scripts configured for the Guest account, as well as a "Family" account that is used at the local console of the actual Media Center PC.


Finally... With either configuration, I'm still having problems and hopefully someone here can help shed some light on the subject. I am attempting to play MP3 files from the Media Center interface on an XBOX 360 Elite. These MP3 files are located on a NetGear ReadyNAS device on my network.

1. I can play all songs just fine from the Media Center interface on the local console of the Windows Vista Ultimate Media Center PC.

2. I added the watched folder on the XBOX 360 MCE and can see all the albums & songs in my library.

3. When I attempt to play a song from within the Media Center interface on the XBOX, I get "Audio Error: An error occurred while trying to play your selection".

4. I mapped the \\NAS\MEDIA folder using credentials, as drive M: for the user used for local login on the Vista Ultimate machine, as well as the Mcx1-XXXX account that is used by the MCE.


I'm stumped as to why it still will not play the MP3 files. I just ripped them all a month ago. Most were ripped using LAME. Some were ripped using Windows Media Player.

I know that this blog probably isn't the best place for this and I apologize. But I'm desperate! Someone clue me in! ;)

Thanks!

toby said...

Hello,
"I brushed up on my NT Admin skills, so I was relying on documentation that I found. The documentation I found was that everything had to be in the NetLogon folder in order to be found during the login process. Can you elaborate?"

There's more than one way to accomplish what we need to happen, which is login scripts running when certain accounts logon. The method I use works, and confuses people because those directories don't necessarily already exist on systems, but that is how I chose to do it. And if you run my to 'as administrator' my tool will create the directories, and scripts, and it should all work.

Your not the first person that seems peeved at my approach. I don't care how you accomplish it. If you want to run gpedit.msc and put a logon script in the User portion, do that. If you want to use a netlogon folder, do that. It's all to accomplish the same goal.

You say this:"I mapped the \\NAS\MEDIA folder using credentials, as drive M: for the user used for local login on the Vista Ultimate machine, as well as the Mcx1-XXXX account that is used by the MCE." but you cannot do that. What's the password to the MCX account? That's what the tool I made is for...

You need to look in the event logs on your Media Center. Your having a path or permissions error. Probably permissions.

On your NAS have an account and password setup with all the access needed to the content on the NAS. Run (as administrator) my ELS Tool on your Media Center. Check the boxes for the mcx accounts, put the account you created on the NAS in the boxes, put in a test path, test, make sure it can authenticate. Then have it do the scripts for you. Then disconnect the media center on your extender (in other words, back out) and go back in to media center. This should fire the logon scripts adn the extender should have access to the files.

toby said...

Oh - and again - I think the key to the problem, should it persist, will be looking through the event logs on your system and seeing what's going wrong.

N8WEI said...

Hey Toby,

I think you got the wrong idea. I wasn't peeved at all. I wasn't complaining about anything. I was simply providing some feedback regarding the "Administrator level" account vs. the ACTUAL Administrator account.

Aside from that, my questions regarding the login script was just to understand what was happening behind the scenes. I know that the "logon script" path is relative, and I was wondering how Vista handled this, because your approach works, as did my original approach. So it seems that the Repl\Import\Scripts folder is scanned, as well as the \NetLogon folder. All I was wondering is if Vista/NT scanned multiple locations looking for the script identified in the Logon Script setting. Just trying to understand is all...

When I said, "I mapped the \\NAS\MEDIA folder using credentials, as drive M: for the user used for local login on the Vista Ultimate machine, as well as the Mcx1-XXXX account that is used by the MCE.", I =was= talking about using your tool. I ran your tool, which created login script for the Mcx1-XXX account, mapping M: to \\NAS\MEDIA. I am running Vista Ultimate though, so I could have manually created the entry for the login script without knowing the password for the account. I have the ability to go into Computer Management and manually configure a login script for any of the users on the box.

The \\NAS\MEDIA share is =NOT= on a Windows resource, so the username/password used to log on to that share is not an NT login. It is a special login that is created on the remote NAS device. So I know all of the usernames and passwords that need to be used there.

Sorry if I confused you. I was simply trying to get a better understanding of the "relative-ness" of the logon script path...

As for the MP3 not playing... I think I simply have issues with the XBOX, as I resorted to copying my test MP3 files directly to the hard drive of the Media Center PC, and they still will not play via MCE on the XBOX. So I suspect that is an entirely different issue.

Thanks for your great tool though! I wish more configuration control was built into Media Center. Your tool definately fills a gap left by the great Microsoft wisdom!

toby said...

Hi,
Thanks for writing back. I understand what you are saying.

So did you getting working? Accessing your NAS. What kind of NAS do you have and do you like it? I was thinking about getting a NAS.

Those mp3 files you were talking about, is it maybe DRM preventing them from playing?

N8WEI said...

Hey Toby,

I can access the NAS fine with other types of media. I have several ways I have found to make that happen.

One way was to actually create a symbolic link using the command line MKLINK command, thus creating a folder ON the Media Center PC, that actually showed content from the NAS. (C:\LINKS\NAS\MEDIA\...)

The other way was to map the drive using your tool (or manually). (M:\...)

The NAS that I have in place is a NetGear ReadyNAS 2100. I am very happy with it. It's 4TB with RAID-5 (actually NetGear X-RAID, but basically the same redundancy), so I end up with about 3TB of storage space. I have the entire house wired with Solid Strand, Shielded CAT6, and wired into a NetGear Prosafe Gigabit Switch. The switch has 2 Gigabits (Up/Down) dedicated per port, so I can sustain a full Gigabit of transfer with the ReadyNAS. The ReadyNAS actually has two Gigabit ports, for high-utilization situations, but I don't really have a need for that at this time.

I have been using the NAS for organizing digital photos (15 Megapixel, high-quality stuff), and I can tune and tweak photos as if they are local to my laptop. I have to "plug in" and forego the wireless connection for that soft of activity. But when I do, I really can't tell the difference between the files being local and on the network.

I can access photos, videos, etc. on the ReadyNAS from the Media Center PC and the XBOX MCE. It's only the MP3 files that are not playing. They appear on the Media Center PC itself and play fine from there. They also appear on the XBOX MCE, but when I attempt to play them, the play fails.

I have even moved the MP3 files over to the local hard drive of the Media Center PC, and they behave identically from there. I have ripped them all without DRM, so DRM shouldn't be the issue.

Since they play from the Media Center PC, but not from the XBOX MCE, I'm convinced it's just a problem with the XBOX. I'll have to re-open my support case with the XBOX people.

Sean said...

Great app Tobias been researching for hours on how to get the xbox 360 to read my nas drive ( a 1tb drive connected via usb to an airport extream) came across some info on login scripts and then finally your app. ran it as administator and bobs your uncle. And this was all on windows 7 ultimate cheers

Anonymous said...

Hi Thanks for the program. I run W7 and with Xbox360 as extender. It works fine in about 1 min. then it stops?

toby said...

Do you get an error message or anything? Does it freeze, or disappear, or what? I've got a Win7 MC machine and the tool works ok on it. You can email me details if you want aamjohns@yahoo.com

Anonymous said...

Toby you are the man. Took me a few hours over a few days but with you info,lots of reasoning and reading between the lines i got my extender to share with my NAS. This program worked as described,and made the final connection i needed in the end. I started with a fresh MCX profile,shared my folders unc style,set my admin account as "windows media server service" log on then ran your script and i was in like flynn. thanks a bunch. oh yeah win 7

Anonymous said...

Unfortunately for me it doesn't work at all (im using Windows 7)
I don't understand where the problem is..i did everything just the way it is described in the manual:

-i typed in my login data
-i chose the path of my nas
-i went to "add"
-i klicked on "test"

When I browse for the mapped nas-folder in my system, which has a drive letter ("z:" in my case) i get the failure message: Failure connecting to Z:\ -->System Error 67 (translated from german) the drive name has not been found

When I browse for the nas-drive instead (in the network section..NOT the mapped drive on my system) A different failure message appeared wich says: "failure connecting to "\\mynas\folder\"-->System Error 1219 (the following is also translated from german): Multiple Connections to a server of the same user with multiple user names is not permited. Disconnect all the previous connections to this server and try again.

What am I doing wrong ?

PS: I should also note that i DON'T need a password to access my nas from the windows explorer. The passwort request only appears when im doing administration tasks in the browser.

toby said...

That happens when you already have a connection open. One way or another you have authenticated to the device. Do you already have a mapping? Did you do a unc connection? Make sure you do not have a mapping and try rebooting your computer and running the tool again. Basically it is saying you've already connected with this account, I can't let you connect with another account. Or just use the account that is already connected with the tool.

Anonymous said...

Hi i have written a guide for this if you want to read it drop me an email raker38@hotmail.com

also disconnect mapped drives before using tobias's program. you cant have a mapped drive when making a unc path

toby said...

Also, if a password is not required you might want to read my post:
http://tobias-tobin.blogspot.com/2008/07/using-transcode-360-media-extenders.html

BigMic said...

@toby/anonymous thanks for your answers. im a kind of noob when it comes to network stuff.
just to get sure that i get the difference of an unc path and a mapped drive:

unc path: i.e. \\server\folder

mapped drive: i.e. z:\server\folder

am i right ?

BigMic said...

one more thing @toby: i've already tried to solve the problem the way it is described in your suggested link. it didn't work neither :(

BigMic said...

anyone ? :(

toby said...

BigMic,
I'll help you the best I can. I'm not sure what's going wrong. Why don't you email me at aamjohns@yahoo.com and we will work on this. There is a remote tool called 'logmein' at http://www.logmein.com. I suppose you could register there, install LogMeIn Free and then you could call me on the phone and give me the info I need to connect and I could have a look at it. Or we can just discuss it over email.

If you are still getting that error it just means a connection to the other device is already established. Do you know what account that might be? If so, if you run my tool and use that account it should work.

It's just hard to troubleshoot this stuff sometimes this way...

Later,
toby.

BigMic said...

Hi Toby!

Thanks for your suggestion. I sent you an email 2 days ago. Did you get it ? If you have Skype or MSN these are my nicknames:

Skype: q4ttrostelle
MSN: bmic@gmx.de

Hope to hear from you soon!

Cheers

BigMic

Lars said...

Dear Toby,
thank you very much for this excellent program. It worked perfectly on my windows-7-premium mce, linksys dma 2200 and qnap nas.

Anonymous said...

Thank you, work great on my Windows 7 64bit

Graham.langford said...

Toby

I have just tried your program for mapping NAS drive folders to WMC and it worked a treat, Thanks.

The only problem I have now is that when playing a movie on my Linksys DMA2200 using Mymovies it says ‘Playback failed’ If I play similar movies through the Pictures & Videos folder (Which comes from my NAS also) they play fine. It seems MyMovies isn’t working correctly. Also I noticed that if you press OK when it says Playback failed and then go back to the MyMovies it starts to play the movie in a small thumbnail at the bottom left corner. You can then scroll to it and enlarge it full screen, but it is quite pixelated and not really watchable.

Have you come across this before?

Martin Gudgin said...

Thanks for this article. I actually made my script look like this;

net use "\\arbitrary\media" "Password" /User:DOMAINNAME\USERNAME /persistent:no

and everything worked fine.

Mike said...

Thanks for this tool. It did work for me some what. I want to run two (perhaps as many as 4 later) extenders. After running this tool I can watch movies from the first extender that started. It does not matter which ones goes first it will be successful and the second extender gets the path not found error. I tried creating different users and assigning them to the mcX-xxxx ids seperately but that did not help. Also manually edited the two scripts so that they mapped to different drives. Any Advice is greatly appreciated. Mike

Dave said...

Running Windows 7 Home with Xbox 360 Extender (fully up to date), i find that when i run the App create a config file all works. When i come back a day later it seems to not, Media Browser does not see the shares... Im wondering if something is going screwy when the Media Centre puts itself to self. If i run the app again, create the config files - all works again. However, the original file was still there and correct. Need to have a bit of a play - anyone else seen issues before i do?

toby said...

Dave,
You shouldn't really need to re-run the tool. As you already noticed, it is just going to recreate what you already had.

I'm not really sure what to say with the given information. Is the Media Center PC going to sleep or something?

The way it should work is when you are on the xbox and you fire up media center it should be connecting to the Media Center PC and triggering the drive mappings for the account the xbox uses (mcx1, etc). If it works and then it does not, somehow you are losing your connection to the shares.

If you have any more information about this problem it might be helpful. As it is I'm not sure what to say.

Thank you,
toby.

Dave said...

Hi Toby,

Im going to try and disable the autosleep on the MC, at current it has an program that sends it to sleep when its inactive - the Xbox then uses WOL to wake it up when you launch the MC on the Xbox; this all works fine, however the drives just do not appear in Media Browser on the Xbox. If i rerun the program on the Windows 7 MC, power off/on the Xbox all is fine and dandy again.

The NAS is running Solaris 11, i can see 'guest' failures in the logs - which would suggest the Xbox is not trying to authenticate with the script generated by your program; which in turn suggest the Windows 7 box is not executing it as it should when the Xbox logs in:

Mar 3 17:03:28 boss smbsrv: [ID 421734 kern.notice] NOTICE: [BOSS\guest]: tv bad path: /vol1/media/tv
Mar 3 17:03:28 boss last message repeated 1 time
Mar 3 17:03:28 boss smbsrv: [ID 421734 kern.notice] NOTICE: [BOSS\guest]: t share not found

Note the path is showing as bad, because its not authenticated, not because it doesnt exist.

Will keep looking....

Dave

Dave said...

I spotted the following in my NAS logs, right before the guest attempts - i suspect it default back to trying guest:

Mar 3 17:20:03 boss smbd[541]: [ID 812811 daemon.notice] logon[\mcx1]: WRONG_PASSWORD

Guest attempts

kern.notice] NOTICE: [BOSS\guest]: xxxxxxx bad path: /vol1/media/xxxxxxx
Mar 3 17:20:28 boss smbsrv: [ID 421734 kern.notice] NOTICE: [BOSS\guest]: xxxxxx share not found

So changing, the script found here to use the username 'HOSTNAME\mcx1' instead of 'mcx1' - this is probably some workgroup/windowsy related issue.

Anyway, woke up this morning turned on the Xbox, it woke up the Win 7 MC...and i have shares still. Will see how we go...

Anonymous said...

Thanks, worked on my Vista machine. Great that you made a program to do this.

Rob P said...

WHen testing, I get Failure Connection to - and then a long string about the syntax of this command is:... blah, blah blah...

Yet I can connect to that exact same UNC path and with the exact same username and password...

AM I missing something?

Anonymous said...

You are the man, didn't occur to me that it was a permissions thing until I found your site. Tool worked perfect.

- Windows 7 Ultimate x64 (WMC)
- 2003 & 2008 Servers (Shares)
- AD 2008 R2 Domain (User)

toby said...

Great. Glad to hear it. Thank you for the comment.

toby said...

Thank you very much. The kind words people like you post help keep me going on this stuff.

David Howard said...

Great tool! Very glad you spent the time creating it.
I have one issue, and I'm doing a little testing to narrow down the culprit.
I have a machine with Windows 7, WMC, and MediaBrowser installed (\\fatbot) is the name of this machine.
I also have a Apple Time capsule (\\timecapsule) on network where i store my movies. Under my user profile, i have a mapped drive to the timecapsule (Z:\)
Your script creation tool works whenever I use it, but the problem is that I have to use it after every reboot; in fact I have to close down WMC, XBox, and then restart Media Center service.
Media Browser starts up Media Browser at login. Since I have that mapped drive to the same network resource, perhaps this is causing a conflict with the drive mapping the WMC user tries to initiate.
Any ideas?

David Howard said...

gonna try enabling guest access to the disks and see what that does...

Arno said...

Hi,

I tried it a few weeks ago, but was not able to connect to NAS.

I am using an open share that does not need (nor)want credentials to connect.
When i tried using your tool it said connecting without username/password not supported.

Any timeline on this?

Thanks! Keep up the good work!

Anonymous said...

TO get this working whilst using Media Browser and Extenders make sure that your media folders are added to Media Browser configurator via the network paths and not the mapped drive paths.

Works a charm.

rogaine hair said...

The first part of starting any new site is picking the niche you want it to be in hotel marrakech. My biggest criteria for this case study was finding a niche that should be fairly easy to get some traction in rapidleech servers, so I went for something pretty obscure pnr status. I don’t know how much money is here, so I’m taking a chance therescrapebox. But all techniques stay the same adwords coupon.

Anonymous said...

I don't know how you figured that out but after a very long night and day I stumbled upon your tool and all is well again.

Now maybe I can actually enjoy the system !

NittnyLion04 said...

I used this program with Windows 7 Home Premium with XBOX 360 Extender to connect to 4 shared folders that required user name AND password. Upon installation, the program automatically filled in the user linked to the Windows Media Extender. All I had to do was type in the username and password and indicate which folders (permisison-protected) I wanted my XBOX to see. I tested it and it connected to ALL of them. Note: I failed the first time because I didn't open the program as administrator, BUT opening it again as administrator solved the problem and I was adding videos and music to my XBOX in seconds after that. THANK YOU!

Dave W said...

Hi Toby,

Firstly thanks so much for your script, it is absolutely fantastic :) I have had it in use for months working perfectly but I just moved house and set it up via another router/network. I didn't think this would make any difference as the extender is the same as is the WMC PC (FYI it's W7 Home Premium) however it did not work so I ran the login scrip generator again. It passes all of the tests without a problem and builds the script correctly however when I click finalise it gives me 'Directory already exists' (which is fine), 'file written correctly' (which is fine) but the final line is 'Failure setting login script'. It says 'Completed but with errors' but unfortunately does not work and the relevant folders still can't be seen on the extender (i'm using a Linksys DMA2200 FYI).

The login script exists in the correct directory and seems to contain the correct info, I just can't work out why it would be failing to set the login script and can't find any reference to anyone else having the same problem.

If you have any idea why this might be happening then i'd love to know, or anything i could try to get around it as this is driving me crazy!!

Thanks so much for all of your great work!

Dave

toby said...

Hi Dave,
Thank you for the kind words.

I'm not sure why this is not working. If all you did is unplug you equipment, move to a new house, and plug it all back in, it should work. Your devices might have different ip addresses but that should not make a difference.

When you did your new setup, did you have to re-add your extender through Media Center? If so, it might have created a new MCX account.

From the info to go on this is difficult to diagnose. We can try to resolve this through correspondence (please email me at aamjohns@yahoo.com). If you email me I will write you back some stuff we can try.

For now, here are some quick things you can check. 1) make sure that you've got sharing enabled. Go to control panel>network and sharing center>on the left click on Change advanced sharing settings. Make sure that on your settings you have network discovery enabled and file and print sharing enabled.

Next, check your security event log. This is what I would do. Open the Event Viewer and right click security and choose to clear it. Next, go to the extender and try to watch something. After it fails, go back to the Media Center and check the security event log. You might need to refresh it first. Look and see if there is a failure for the extender connecting. You'll probably be looking for a failed login attempt by an mcx account. Or you could see a connection blocked if a firewall issue.

But you can also email me a copy of the script. I would like to see it and verify the syntax.

toby said...

Dave,
Make sure you are running the app as administrator. You can right click the icon and choose 'run as administrator'. Unless you have UAC disabled. If that is the issue it just doesn't have permission to write to the script file.

toby said...

To all,
I have just discovered I appear to no longer have the source code to this app. I was reading through all the posts and saw where I could fix some stuff and well...I can't now. hehe. I'll keep looking hopefully i can find it. If not i can make the tool again if needed.

Dave W said...

To Toby,

Thanks so much for your speedy response! Unfortunately I am running it as administrator already (I have made that mistake before!!) but I still get this error. Any other ideas what might be causing it? :)

Thanks so much,

Dave

toby said...

Dave, look at my post from 5:41PM. In that one I give you some other stuff to try. Like I said above, if you want to email me we can probably arrange a teamviewer session or something and I can help figure out what's wrong. aamjohns@yahoo.com

Dave W said...

Hi Toby,

My upmost apologies I didn't see your original post before I replied to your second one! I have tried everything that you suggested however unfortunately I am still having the same issues but I will send you an email in a moment to see what you think!

Thank you so much for all of your help,

Dave

toby said...

Dave,

You could try renaming the existing script to .old and run the tool again and make a new file. See if the 'failed with errors' goes away.

If you want we can arrange a time and we will call each other and we can do a teamviewer session to your media center. I can work with you on this. I know it must suck to not have your media on your extender.

Later,

toby.

laub8 said...

Hi Toby

i used your tool to give an extender access to a WHServer. everything worked fine. since then, i have had to add another folder on the same WHS but for some reason the extender is not able to access these files.

i tried re-running your tool to give access to both the old folders and the new one but no luck.

guest account is disabled and the login/password info i used is definitely correct.

any ideas?

thanks!

Aaron said...

Hi,
I am not sure what is causing this issue for you. Do the previous mappings still work?

The tool is designed to test before establishing the code to be used. Is the test succeeding? Also, are you running the tool as administrator? Right click run as administrator. It has to be able to overwrite the existing script. Which sounds to me might be the problem. I wonder if the logon script is getting updated with the new settings.

Another thing you can do is run through the process and look at the code in the box. Make sure you see the line for the new mapping and that is all looks correct.

Finally, browse to C:\Windows\System32\Repl\Import\scripts and locate the logon script. Right click it and choose edit so you can view it. Make sure it is correct, with your new mapping defined. If not, then when you run the tool the script is not getting overwritten.

It might be easier to work through this is you want to email me.
aamjohns@yahoo.com

Thanks,
tobias.

Anonymous said...

Awesome tool - worked great - I didn't read the instructions, but a note at the top of the app saying "MAKE SURE YOU RUN AS ADMINISTRATOR" would have saved me about 45 seconds :)
Also the test failed every time, but I saw what the script was doing and it looked good, so I deployed and it worked great.

Thanks! (now if I can get Win8 to see my NAS as a photo library.... :( )

Anonymous said...

How can we undo this tool? It doesn't seem to be working for me

Ian said...

The concept behind this is great. It didn't work for me out of the box because the script runs in a command prompt, which opens a window, and that's killed as an "unauthorized window." I've seen the problem mentioned a couple times with no solutions, so hopefully this will help somebody. Apparently there are group policy ways to stop the window from opening in the first place, but they looked like Active Directory domain controller changes, and I couldn't figure them out on my Windows 7 Pro machine.

My solution, in case anybody else runs into a similar problem, was to turn the original script into a Power Shell script, which I could hide. After running the tool:

1. Change the extension on the script created to .ps1
2. Create a Visual Basic (.vbs) script something like so:
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("powershell.exe -windowstyle hidden -noexit C:\Windows\System32\Repl\Import\Scripts\Mcx#-xxxx.ps1"). Place it in the same directory as the Power Shell script.
3. In "Computer Management", find the Extender's account (Mcx#-xxxx), edit properties->profile, and change the login script to the .vbs script.
4. Allow Power Shell scripts to run. See http://technet.microsoft.com/en-us/library/ee176949.aspx. (I used the command
"Set-ExecutionPolicy RemoteSigned")

I hope that saves somebody else the trouble I ran into.

Cheers!

Greg said...

Another happy user of your tool, thanks alot for writing this 5 years ago and keeping it posted.

toby said...

Awesome. So good to hear. And you are right, the years have flown by. I'm glad it is still working for people and solving an annoying problem. I get the occasional post where someone says it doesn't work, yet I cannot reproduce what they say.

The comment right above you from Ian is very cool. He didn't just say 'it doesn't work'. He offers a solution. I really appreciate that. Thank you Ian. The only thing about Ian's issue is I've never seen anything like it. I've seen that problem with services, but I have never seen that with a batch file.

I am curious if that could have anything to do with User Account Control. I don't use UAC. I work in an Enterprise environment and right away leaving it on caused issues. On top of that, for its intended purpose, I don't see the intended results. I am all the time cleaning up spyware/malware/scareware off people's machines that have the UAC enabled.

A lot of the programs I write do not work successfully unless you either disable the UAC, or right click and 'Run as Administrator'.

I would say the number one reason someone contacts me saying my program doesn't work is actually because they are not running it as administrator.

Regardless, it is cool to get confirmation that this is still a viable option. I had thought about revisiting it and seeing if I could come up with something better but with the proliferation of new technologies and methods like Plex and MediaBrowser3 I was not sure of the necessity.

Thanks Greg. I appreciate your comment.

tobias.

Rick Lindberg said...

Rick says,

Just used with Windows 8.0 Media Center and worked like a charm.

Thanks Toby for simplifying this process to a 5 min thing.

Anonymous said...

Great work mate, worked like a charm for me. Turned out I had two Xbox profiles on the PC which I think was causing the issue but your tool solved all that.

mercblue281 said...

great job! Setup a restricted domain account to access shares while denying interactive logon.
Used that account in conjunction with your tool and the extenders were easily able to access the shares.
Now to debug mymovies and the codec error.
Thanks again - very creative thinking to solve the problem.

toby said...

Hi all,
Thank you for reporting back that the tool is still working. I was considering a rewrite but since it is still working with Windows 8 I guess I do not need to. I did notice the first few lines of my post were invisible (black on black) so I fixed that.

Thanks again. Your feedback helps very much!

tobias-tobin.

toby said...

@Ian,
I'm about to be off for surgery so I will have some time to work on some stuff on here. I'll investigate what you posted and see if I can remedy the issue without users having to do a work-around. I appreciate your feedback and that you provided a work around.

tobias.

Steve Y said...

So I've always setup c:\netlogon folder and shared it as netlogon. Recent reinstallation did the same thing but the script isn't being executed at all by the xbox but the user account was created by the xbox and I added the script into the profile page of that account. I'm manually emulating what you are doing as I'm not installing .net 2 on my system so created c:\windows\system32\repl\import\scripts and put the script in there and then the cmd file I created. Will this work without sharing scripts as "netlogon"?

Ralf said...

Worked out-of-the box like a charm and helped solving a longterm issue here. Many thanks!

Anonymous said...

Thanks, worked like a charm.

Anonymous said...

Thank you! It solved my problem. The only thing I'd like to add is you need to restart the extender after running it.