We encountered an issue during a migration to Windows 10 where I had missed a program which had hard coded links, these no longer worked due to Microsoft Access being a newer version.
I generated a simple script so we could change the hard coded links to allow it to select the correct version, all we do is call the script and add the access filename. It only handles Windows 7 and 10, but you can easily add you own section before goto sub_wrongos by using version numbers from MSDN. It can also be amended to launch something else.
I used start instead of call or simply the command line as this would leave the Windows Command Prompt window in the background until the application it launched was closed.
This isn’t ideal and meant to be temporary, so when fully migrated we will hard code them back to our Office 2016 versions of Access Front ends.
REM This script will need to be passed an Access Front End Name, it will then based on the Windows version launch the correct Access Front End REM Call with <scriptname.bat> <AccessFrontEndName> without an extension (Assume compiled as an accdr) set arg1=%1 REM Check Windows Version is 10 ver | findstr /i "10\.0\." > nul IF %ERRORLEVEL% EQU 0 goto sub_windows10 REM Check Windows Version is 7 ver | findstr /i "6\.1\." > nul IF %ERRORLEVEL% EQU 0 goto sub_windows7 goto sub_wrongos :sub_windows10 ECHO Windows 10 version launching start <Accessfilelocation>\%1.accdr EXIT :sub_windows7 ECHO Windows 7 version launching start <Accessfilelocation>\%1.accdr EXIT :sub_wrongos ECHO THIS SHOULD NOT SHOW! EXIT