Check for Mapped Drive before Running
#1
I have my XBMC set up in a distributed fashion. I have 3 clients (2 Windows 7 HTPCs and 1 Linux Desktop) and a single fileserver (nfs and samba) with MySQL. So I have the database set up for MySQL but I also have a fileshare for the Thumbnails, advancedsettings.xml, guisettings.xml, and sources.xml files. I use soft links (yay NTFS/Win7) from my userdata folder to point to these files which I have on mapped drive.

Here's the thing, sometimes when these machines come up, the drive fails to map automatically for whatever reason (probably how quick the WiFi connects, etc). When this happen XBMC can't read the settings files, and just bluntly goes on creating new files, overwriting the links. This is especially painful because there are HTPCs and I have to break out a keyboard/mouse and relink everything.

On my Linux system, I have solved this with a very simple script that runs the mountpoint command, if it sees the drive isn't mounted, it attempts to mount it 3 times, then just exits if it continues to fail, saving my config files. I always run this script instead of XBMC directly.

Is there some way to do this with a batch file or something on Windows? I'm not a very advanced Windows user so I'm not sure what tools are out there to help me.

Thanks for the help!
Reply
#2
You should be able to add a delay to the XBMC startup to make it wait a set amount of time. Check this link and see if it helps http://wiki.xbmc.org/index.php?title=XBM...seconds.3F

To set this up just right click on what you use to launch XBMC and select properties and then edit target line to looks something like this "C:\Program Files (x86)\XBMC\XBMC.exe" -d 30. The 30 should delay it 30 seconds.

As far as running something to check to see if the drives are mounted I dont know but they should at least alow some more time for the computer to mount them.
Reply

Logout Mark Read Team Forum Stats Members Help
Check for Mapped Drive before Running0