Google Drive mounted as removable drive / Windows shares do not survive a reboot

I use RaiDrive to mount a Google Drive as a local drive on my Windows 10 machine. I then share that drive and some subfolders within Windows. Recently, the shares have all been going away when I reboot the computer. I have to quickly re-share everything and set permissions each time – meaning I have to log in to the machine directly.

I am not sure why this has started happening, but one thing I have noticed is that within RaiDrive, my mounted drive is listed as “Drive: Z: (Removable)” in the “Google Workspace” tab, and is also listed as type “removable” in Explorer. I do not recall if this was the case before this or not, but I strongtly suspect this is why Windows will not keep the shares through a reboot.

I tried setting up a second drive mount to see if there was any sort of option to select removable or not. There was not, and that second drive was also created as removable.

This machine isn’t rebooted all that often, but simply for stability, I will have to switch to another solution until this is fixed if this is not being worked on.

Any assistance will be appreciated.

Hi~ @Trevor_Hammonds ,

The issue that the share disappears occurs because the timing of connecting the drive of RaiDrive and the timing of determining the status of the Windows Server service (LanmanServer) do not match.
Therefore, if you restart the “Server” service, which is a service in Windows, the share will be restored again.
RaiDrive has no knowledge of what is shared and has no control over it.
Therefore, the best solution is to restart the “Server” service after RaiDrive completes the drive connection.
After writing the script below, register it in Task Scheduler and try it.

This is an example when the drive name connected to RaiDrive is Z:. Please change accordingly.
File name: raidriveshare.bat (Please change accordingly.)
The drive must be connected as Public & Local Disk.

rem check drive exists and restart server service
set loopcount=100
:check
set /a loopcount=loopcount-1
if %loopcount%==0 goto restart
dir z:
if errorlevel 1 (echo "not exist" && timeout 1 > NUL && goto check)
:restart
echo "restart server"
sc stop LanmanServer
timeout 5 > NUL
sc start LanmanServer
echo "restart server done"

After creating and saving the file like this, run Task Scheduler and register the task.
When registering in Task Scheduler, set to “Run with highest privileges” and set to “at Startup” (windows start) in Triggers.

For detailed instructions on how to use Task Scheduler, please search the Internet.

1 Like

Thank you. I will give this a try. I appreciate your assistance.

Any idea why this was working for the last few months, then just stopped now?

Hi~ @Trevor_Hammonds ,

We know that the issue is caused by the time when the Windows Server service decides to share and when the drive connection of RaiDrive is completed.
Please understand that we cannot give you an accurate answer.

1 Like