3

The problem is keeping the shortcut pointing to the correct application executable on startup correctly since the folder path changes with each new version number. Each time this change occurs, it breaks user profile desktop icons for Google Drive.

The issue occurs after Google Drive does an automatic update and creates a new sub folder in the main folder of C:\Program Files\Google\Drive File Stream\<36.0.18.0> related to the correlated build\release number creating this problem.

Question: Could I turn off Google Drive automatic updates entirely to resolve, or are there other solutions that might work to resolve this dynamically for the shortcut?

enter image description here

Other detail & things I tried...

  • Now the GoogleDriveFS.exe application is located in 36.0.18.0 so the desktop shortcut no longer works as the path made on the install points to C:\Program Files\Google\Drive File Stream\35.0.13.0\GoogleDriveFS.exe which no longer exists (Directory Empty).
  • I am aware of the AutoStartOnLogin registry entry but this seems to be hit and miss for starting every time and even if it did the users desktop shortcuts would still not work.
  • All google drives were installed with the following parameters
    GoogleDriveFSSetup --silent --desktop_shortcut
2
+50

You can use PowerShell as a startup script to identify the newest created GoogleDriveFS.exe file from within the \Drive File Stream and all beneath sub-folders recursively, and then use its full path to create (or replace) a shortcut .lnk file on the public desktop folder, or wherever is most appropriate for you.

Just use Task Scheduler or Group Policy to run the below logic as a Computer startup script. If using Task Scheduler, be sure to make the task run under the SYSTEM account for security.

PowerShell (version 3+)

$Src = "C:\Program Files\Google\Drive File Stream";
$Lnk = (Get-Childitem -Path $Src -Include "GoogleDriveFS.exe" -File -Recurse | % {"$($_.CreationTime), $($_.FullName)"}) | Sort-Object -Descending | Select -First 1 | %{$_.Split(",")[1].Trim()};
New-Item -ItemType SymbolicLink -Path "C:\Users\Public\Desktop" -Name "GoogleDrive.lnk" -Value $Lnk -Force;

PowerShell (version 2+)

$Src = "C:\Program Files\Google\Drive File Stream";
$Lnk = (Get-Childitem -Path $Src -Include "GoogleDriveFS.exe" -Recurse | % {"$($_.CreationTime), $($_.FullName)"}) | Sort-Object -Descending | Select -First 1 | %{$_.Split(",")[1].Trim()};
New-Item -ItemType SymbolicLink -Path "C:\Users\Public\Desktop" -Name "GoogleDrive.lnk" -Value $Lnk -Force;

Supporting Resources

| improve this answer | |
  • That’s worked 👍 – SQLTemp Feb 7 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.