home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
What is considered as remote share
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RoChess" data-source="post: 923834" data-attributes="member: 18896"><p>The art of batch-scripting, following is my startup-script that is used when my HTPC starts up:</p><p> </p><p>[code]</p><p>@Echo Off</p><p>::Ensure Internet is working</p><p>ping 4.2.2.2 -n 1 -w 30000</p><p>:NoNetwork</p><p>::Johnny Five alive?</p><p>ping UNC_SERVER -n 1 -w 30000</p><p>::Check to see if UNC paths can be mapped, and delete old mapping first if one still exists</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE S: /DELETE</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE S: ##UNC_SERVER\Share1 /PERSISTENT:YES</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE T: /DELETE</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE T: "##UNC_SERVER\Share2 with spaces" /PERSISTENT:YES</p><p>::If still issues, add a 5 second delay before trying again</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" ping 1.1.1.1 -n 1 -w 5000</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" echo WARNING: Network down. Retrying again, use CTRL+C to abort.</p><p>IF NOT EXIST "T:\Network.Drive.Works.txt" Goto NoNetwork</p><p>::All systems go</p><p>sent.exe /d:WORKGROUP "Battle Cruiser Operational -- By Your Command"</p><p>MediaPortal.Backup.cmd</p><p>[/code]</p><p> </p><p>And then 'MediaPortal.Backup.cmd' contains the stuff that will scan my databases to make sure they are not corrupt, back them up if they are good and restore them if they are bad. The reason I map those 2 shares on my setup is because I want to use the plugin DriveSpace on my network shares, so I know how much space I got left, and that only works on mapped network paths.</p><p> </p><p>PS: and yes I actually have the message service enabled on my network so if I WOL my HTPC I'll know when it has actually booted <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p>PPS: NetBIOS names, filenames and share references were changed to protect the innocent, adjust to match your own setup</p><p> </p><p>[edit] Moronic forum system keeps wanting to turn <a href="https://forum.team-mediaportal.com/file://\\UNC" target="_blank">\\UNC</a> into a link, so had to use ##UNC to prevent this from happening.</p></blockquote><p></p>
[QUOTE="RoChess, post: 923834, member: 18896"] The art of batch-scripting, following is my startup-script that is used when my HTPC starts up: [code] @Echo Off ::Ensure Internet is working ping 4.2.2.2 -n 1 -w 30000 :NoNetwork ::Johnny Five alive? ping UNC_SERVER -n 1 -w 30000 ::Check to see if UNC paths can be mapped, and delete old mapping first if one still exists IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE S: /DELETE IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE S: ##UNC_SERVER\Share1 /PERSISTENT:YES IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE T: /DELETE IF NOT EXIST "T:\Network.Drive.Works.txt" NET USE T: "##UNC_SERVER\Share2 with spaces" /PERSISTENT:YES ::If still issues, add a 5 second delay before trying again IF NOT EXIST "T:\Network.Drive.Works.txt" ping 1.1.1.1 -n 1 -w 5000 IF NOT EXIST "T:\Network.Drive.Works.txt" echo WARNING: Network down. Retrying again, use CTRL+C to abort. IF NOT EXIST "T:\Network.Drive.Works.txt" Goto NoNetwork ::All systems go sent.exe /d:WORKGROUP "Battle Cruiser Operational -- By Your Command" MediaPortal.Backup.cmd [/code] And then 'MediaPortal.Backup.cmd' contains the stuff that will scan my databases to make sure they are not corrupt, back them up if they are good and restore them if they are bad. The reason I map those 2 shares on my setup is because I want to use the plugin DriveSpace on my network shares, so I know how much space I got left, and that only works on mapped network paths. PS: and yes I actually have the message service enabled on my network so if I WOL my HTPC I'll know when it has actually booted :) PPS: NetBIOS names, filenames and share references were changed to protect the innocent, adjust to match your own setup [edit] Moronic forum system keeps wanting to turn [URL='https://forum.team-mediaportal.com/file://\\UNC']\\UNC[/URL] into a link, so had to use ##UNC to prevent this from happening. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
What is considered as remote share
Contact us
RSS
Top
Bottom