ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Batch file to detect changing Google Drive startup program version number   [Help!]

By: Andrew Watson     Perth, Western Australia  
Date: Dec 17,2023 at 13:51

On my travel PC which has limited storage (128GB) I have a startup batch file that mounts an encrypted VeraCrypt A: drive on a 256GB USB drive D:.

The USB drive is a low profile SanDisk Ultra Fit USB 3.1 flash drive that doesn't stick out very far. I have Gaffer tape over the drive to prevent it being knocked out when inserting / removing it from backpack.

https://www.westerndigital.com/en-au/pro...ltra-fit-usb-3-1?sku=SDCZ430-016G-G46

Because I am concerned that the PC may be lost / stolen I point Google Drive and OneDrive to A:.

It has worked very well for several years. However, there is one slightly annoying glitch:

The path to the startup file for Google Drive includes the version number which changes quite frequently.

C:\Program Files\Google\Drive File Stream\85.0.25.0\GoogleDriveFS.exe" --startup_mode

It's not a big deal because when it changes, an error message is displayed which I know means I have to find out the latest version number and amend the batch file.

I was wondering if any of the batch file gurus here could devise some code that could automatically detect the latest version number and run that version?

If it's of any use, the Drive File Stream folder contains the files listed below and 3 folders:

"C:\Program Files\Google\Drive File Stream\deleteonreboot"
"C:\Program Files\Google\Drive File Stream\launch.bat"
"C:\Program Files\Google\Drive File Stream\docs.ico"
"C:\Program Files\Google\Drive File Stream\drive_fs.ico"
"C:\Program Files\Google\Drive File Stream\sheets.ico"
"C:\Program Files\Google\Drive File Stream\slides.ico"

* 82.0.1.0 - Presumably the previous version which will be deleted on next boot. There is only one file in the folder drivefsext.dll which presumably was in use when the other files were deleted.

* 85.0.25.0 - This contains:

"C:\Program Files\Google\Drive File Stream\85.0.25.0\snapshot_blob.bin"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\v8_context_snapshot.bin"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\icudtl.dat"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\chrome_elf.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\d3dcompiler_47.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\dokancc31357.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\drivefsext.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\libcef.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\libEGL.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\libGLESv2.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\vk_swiftshader.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\vulkan-1.dll"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\crashpad_handler.exe"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\GoogleDriveFS.exe"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\switchblade_host.exe"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\uninstall.exe"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\vk_swiftshader_icd.json"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\chrome_100_percent.pak"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\chrome_200_percent.pak"
"C:\Program Files\Google\Drive File Stream\85.0.25.0\resources.pak"

* Drivers

-------

::VeraCryptMount.bat

:: Startup folder location
::C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Start-up

SET VERACRYPTPROG="C:\Program Files\VeraCrypt\VeraCrypt.exe"
SET VERACRYPTDATA=D:\PC Setup\Veracrypt
SET ONEDRIVESTART="C:\Users\Andrew\AppData\Local\Microsoft\OneDrive\OneDrive.exe" /background
SET GOOGLEDRIVESTART="C:\Program Files\Google\Drive File Stream\85.0.25.0\GoogleDriveFS.exe" --startup_mode
SET DROPBOXSTART="C:\Program Files (x86)\Dropbox\Client\Dropbox.exe"

type "%VERACRYPTDATA%\beep.txt"
timeout /T 1

type "%VERACRYPTDATA%\beep.txt"
timeout /T 1

type "%VERACRYPTDATA%\beep.txt"
timeout /T 1

start "" /wait %VERACRYPTPROG% /volume "%VERACRYPTDATA%\VeraCrypt.hc" /letter A /beep /quit
timeout /T 2

start "" %ONEDRIVESTART%
timeout /T 2

start "" %GOOGLEDRIVESTART%
timeout /T 2

::start "" %DROPBOXSTART%

pause


Andrew Watson

137 views      
 

Messages in this Thread

 
96,626 Postings in 12,229 Threads, 350 registered users, 32 users online (0 registered, 32 guests)
Index | Admin contact |   Forum Time: Feb 21, 2024 - 11:11 am UTC  |  Hits:61,509,212  (3,563 Today )
RSS Feed