When booting into Windows, the OS sometimes does not reconnect mapped network drives even though the mapping is configured with the “Reconnect at sign-in” option. This is due with various timing constraints of resources during boot.
Although there are free Third Party software available that can automatically reconnect your mapped network drives, I would rather be able to do this using built-in tools than add more unnecessary software to my system. I’ve therefore written a Command Prompt script using the “net use” command. Not the prettiest of code but it does the job. Tested in Windows 10 Pro 64-bit.
The script was saved as a .CMD batch file which is executed by twice using Task Scheduler at user log on; one in non-admin and the other in admin mode. This allows mapped drives to be visible to those applications running in non-admin and also to those applications running in admin modes.
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
TITLE Mapping network drives
@ECHO Please wait whilst we reconnect your network drives.
SET /A trueloop=%loopvalue%-1
IF "%counter%" EQU "%loopvalue%" (
ECHO Connection to D:\ drive timed-out
ECHO Attempt %counter% of %trueloop% to D:\ drive
TIMEOUT /t 5 /NOBREAK >NUL
IF EXIST D:\NUL (
ECHO Attempt %counter% successful.
NET USE D: \\192.168.49.69\Data /PERSISTENT:YES
IF "%ERRORLEVEL%" NEQ "0" IF "%ERRORLEVEL%" NEQ "85" (
SET /A counter=%counter%+1
IF "%neterror%" EQU "0" GOTO Endofscript
SET /P userinput="Errors were found. Do you wish to try again [Y/n] "
IF /I "%userinput%" EQU "y" GOTO Start
IF /I "%userinput%" EQU "" GOTO Start
IF /I "%userinput%" EQU "n" GOTO Endofscript
@ECHO Please wait, script is closing.
TIMEOUT /t 5 /NOBREAK >NUL
@EXIT /B 0
A rice field several miles from Hpa An, Myanmar. We had already journeyed through a cave in this karst-rich landscape when we came across this field. It was great to be out in the open again!
It was April 2011, just after dusk, and we made our way to a restaurant in central Baghdad along Abu Nawas Street by the River Tigris. This area is well known for serving Iraq’s favourite fish dish; the “mazgouf”.
The restaurant, although having a roof, is open to the elements and was filled with many customers; obviously a popular place.
Having selected our live carp (allegedly from the adjacent Tigris but more probably from a fish farm), the cook removed the fish from the tank and then stunned them with a stick, gutted them by cutting along the back, applied some seasoning, and then impaled them to be slow-grilled next to an open fire of burning fruit tree branches such as from lemon trees and orange trees. What we didn’t realise was that it takes about an hour or so to cook the fish, so we had a lot of time to chat!
Carp are bottom feeders and if they were from the Tigris around Baghdad then I’m not sure that I’d have too many fish dinners; there’s just been too much dumped in the river. Once I’d got past wondering where the fish came from, I did enjoy the meal.
But the mazgouf is an important dish to the Iraqis and the Iraqi diaspora, and it helps to unite them through social gatherings and reinforce their identity and uniqueness; something that’s very much needed in these trying times.
We were journeying overland from the south of Namibia to the north, and had an overnight stay in a secluded rest-stop. The stars were out, and we wandered across a field looking up at the Milky Way.
During the Ananda Pagoda Festival at the Ananda Temple in Bagan, Myanmar, the region becomes extremely busy with pilgrims arriving from all over the country. This is one of many Buddhist monks at the temple. Photo taken in January 2014.
After a long day in Amboseli National Park in Kenya, it was time to return to the lodge. Venturing back, we were greeted by this wonderful view of Mt Kilimanjaro, the clouds ablaze in the colours of sunset. Photo taken in May 2017.
There we were, travelling along the Hindu Kush in Afghanistan. A journey through mountain passes and dry valleys, along dried river-beds and empty places on lonely roads, with nothing more than dust-devils keeping us company. Low temperatures and the glare of the sun added to the harshness of the landscape.
However, it was a challenge that I enthusiastically seized in my quest to reach the fabled Minaret of Jam, a place that only a few travellers reach. But here, in the middle of nowhere, there was human activity; a rest-stop for truck drivers hauling their goods across the country, a place to stretch the legs and take shelter from the elements.
Although it was August, the place was cold, and I couldn’t imagine what this place would be like in winter. A hardy landscape creates a hardy people. This man tendered to our needs with chai and food, his face betraying the challenges of the environment.
In southern Iraq, just a few miles from the Iranian border. It was another hot day, and I was standing outside the structure called Ezra’s Tomb. Nearby, three kids were peeking through a doorway, their faces in obvious delight at the interest being shown to them by my camera. But the countless horrors of people killing other people will touch their lives in countless ways, and I wonder if they still smile. But I have hope.
I was exploring the relationships between photos and considered that contrasting colours could form a thematic link . So here is an expression of that thought with two photos; one from my trip to Bhutan in 2004, and the other from my trip Chile in 2006 .
I was here to experience the Karen New Year festivities in a rural village a few miles from Hpa An, Myanmar (Burma). During the day, much work was being undertaken by the villagers in preparation of the festival, and I went for a walk around the village and soak up the atmosphere.
Everyone seemed to be enjoying their tasks, including this man cooking the rice . The celebrations continued long into the night and, with the music, you can forget about sleeping! Photo taken in December 2014.