Using Google Drive as a space public folder

Hi,

We have recently switched from Microsoft to Google. When we were on Microsoft, I could use a OneDrive folder as a space public folder.

When using Google, the G:\ virtual drive does not show up as an option to select. How do I configure EM Server to show it? I tried to map a drive but again G:\ does not show.

Regards,

Shaheed

Hi Shaheed,

Make sure that the G:\ drive is configured for the Windows account that is used by EasyMorph Server service.

I shared the drive as follows:

image

image

But then this morning, the tasks kept failing. It seems like the setting did not persist upon restart. Do you have any further instructions on how best to configure it?

Would it be better to configure as follows:

  1. Stream files to a folder on the computer instead of a virtual drive
  2. Configure sharing as:

image

I haven’t quite got this working as EM Server can’t see this folder but I thought I would check in the meantime.

Mapped drives are configured in a Windows user account but this configuration may not be persistent, so re-mapping should be done each time the Windows account logs in. Therefore you need to make sure Google Drive runs before the Server starts.

You can try to put a command-line statement in the Server’s onstart.bat file (read Server Admin Guide, page 28) to launch the Google Drive utility before Server starts.

PS. Your screenshots are really small.

Sorry about the small screenshots.

Thanks for the reply. Sorry :bowing_man: about the small screenshots. Here’s what I have learned so far in doing this

  • Changing streaming to a folder location (see below) does not work because sharing to the user that runs the EM server service does not work:

@dgudkov, I have tried creating the share using net share in a command prompt window but it does not seem to work:

I was hoping that if I could figure this out in a normal command window I could insert into the onstart file. Any ideas?

Another option my IT guys suggested to me was to insert the command into a powershell command and then follow a sequence as follows:

  1. start google drive
  2. run powershell command
  3. start easymorph server

However, EM Server is configured as a service so I am not sure of the implication.

Feeling a little frustrated by this situation! I am loving Google since we switched from Microsoft but this is a little painful to configure. I appreciate your time in helping me.

You don't need to do NET SHARE - EasyMorph Server does it under the hood. You just need to make sure the folder to share exists before EasyMorph starts.

That's exactly what onstart.bat (that I mentioned in my previous post) is for. It runs a sequence of commands when Server starts. You can put the commands to start google drive and call the powershell script in onstart.bat and EasyMorph Server will execute it when it starts.

Thank you @dgudkov . I got there in the end. For anyone that wants to know what to put in the onstart.cmd file, please see below.

In the onstart.cmd file, I put the following:

REM place here any tasks that should run before server engine is started
echo start
Powershell.exe -executionpolicy Unrestricted -File "C:\EasyMorph Temp Files\Powershell Script to Call on EasyMorph Start.ps1"
pause

The PowerShell script contains the following:

#If Drive File Stream is not running, start it
echo "Start Google Drive even if it is already running."
$GDriveFS = Get-ChildItem "$env:ProgramFiles\Google\Drive File Stream\" -Filter 'GoogleDriveFS.exe' -Recurse
Start-Process -FilePath $GDriveFS[0].Fullname
echo "Check if network share for MLC - EasyMorph Projects exists"
if(!(Get-SMBShare -Name "MLC - EasyMorph Projects" -ea 0))
{

    echo "MLC - EasyMorph Projects does not exist - Create network shares for folder that is required for EasyMorph to function. Share to the user that the EasyMorph Server process is using"
    New-SMBShare -Name "MLC - EasyMorph Projects" -Path "G:\Shared drives\MLC - EasyMorph Projects" -FulLAccess "EasyMorph Server" -ChangeAccess "Server Operators" -ReadAccess Users
}
if(!(Get-SMBShare -Name "MLC - Buying" -ea 0))
{

    echo "MLC - Buying does not exist - Create network shares for folder that is required for EasyMorph to function. Share to the user that the EasyMorph Server process is using"
New-SMBShare -Name "MLC - Buying" -Path "G:\Shared drives\MLC - Buying" -FulLAccess "EasyMorph Server" -ChangeAccess "Server Operators" -ReadAccess Users
}
echo "Backup EasyMorph Server configs and spaces to Google Drive"
Copy-Item -Path 'C:\ProgramData\EasyMorph Server\config' -Destination 'G:\Shared drives\MLC - EasyMorph Projects\Server Backups' -Recurse -Force 
Copy-Item -Path 'C:\ProgramData\EasyMorph Server\Spaces' -Destination 'G:\Shared drives\MLC - EasyMorph Projects\Server Backups' -Recurse -Force

@dgudkov I spoke to soon. I restarted my server machine and the whole mounting process did not work. Any other ideas?

Hi @Shaheed_Fazal

You could check Windows Event Log for the startup script execution details. Every Server startup creates records in the Windows Event Log.

Google Drive Streaming creates a virtual drive accessible only by the Windows Account logged into the Google Drive application. This drive can’t be accessed from another scope like another windows service.

I did manage to configure the Public folder with Google Drive Streaming by using a Worker (agent) that runs under the same credentials as my Windows Account. (picture A)

There is another option to configure Google Drive. When Google Drive is set to Mirror files (instead of Stream files), your files are really synced to the folder, and no virtual drive is created. (picture B)

picture A
picture B

@ckononenko, thanks for your advice. The mirror files was disabled by my Workspace Administrator. I have managed to get the setting disabled and can report that this is the simplest way to resolve the issue.