Hi, minor bug, but updating EDT keeps old versions program files and start menu shortcuts
It is deliberate. So you can run multiple versions at the same time. But, as the product becomes more mature, we might change this policy.
I prefer it as it is at the present, especially as I always install the ‘quick fix’ versions, so if anything is wrong, I simply run the prior one.
We might default the v2 production versions to:
C:\Program Files\EasyDataTransform_v2
And the v2 snapshot versions to:
C:\Program Files\EasyDataTransform_v2_snapshot
Haven’t made a decision yet.
Can we consider asking user during install if they wish to overwrite current installation (non default) or create new version (default) option
OR having 1 bat file which always launches the latest version of EDT.
This is the approach followed by Google for their Drive File Stream. See bat file below
@echo off
rem Launcher script for GoogleDriveFS.exe that looks up the latest
rem GoogleDriveFS.exe and runs it with the same arguments as the script.
rem Convenient to use as a target for Windows shortcuts.
rem Use '!' instead of '%' for variable names.
setlocal EnableDelayedExpansion
setlocal EnableExtensions
rem
rem First try looking in the registry.
rem
set COMMAND="reg.exe query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{6BBAE539-2232-434A-A4E5-9A33560C6283} /v InstallLocation"
rem Get the 3rd and following tokens of the 2nd line separated by space.
for /f "skip=1 tokens=2,* usebackq" %%A in (`!COMMAND!`) do (
set EXE_PATH=%%B
)
rem Run the exe specified in InstallLocation if it exists and the name is right.
if exist "!EXE_PATH!" (
if /I "!EXE_PATH:~-17!" equ "GoogleDriveFS.exe" (goto :RUN_IT)
)
rem
rem If we fail, look in the current directory.
rem
set DRIVE_FS_DIR=%~dp0
rem Sort DRIVE_FS_DIR's subdirectories (/a:d) by reverse date (/o:-d) of
rem creation (/t:c) and find the first one that contains the exe.
for /f "usebackq" %%A in (`dir "%%DRIVE_FS_DIR%%\*" /a:d /o:-d /t:c /b`) do (
set EXE_PATH=!DRIVE_FS_DIR!\%%A\GoogleDriveFS.exe
if exist "!EXE_PATH!" (goto :RUN_IT)
)
:FAIL
@echo Fatal error: Can't find DriveFS path. Please reinstall Drive for Desktop.
pause
exit /b 1
:RUN_IT
@echo Found path: !EXE_PATH!
start "Launch Google Drive" "!EXE_PATH!" %*
exit /b 0
If it asks you the install location (which defaults to overwriting C:\Program Files\EasyDataTransform_v2) then you can easily enough change it to a different folder if you want a separate install.
Good enough solution!!