![]() |
#1
|
|||
|
|||
![]()
I am trying to create a batch script, (only specifically batch script), to check if the latest Microsoft Office version is installed to my computer. If it detects the latest version, it will output hello, else it will output heyo. However, the if else statement doesn't seem to be working as I kept receiving the echo "heyo" even when the correct version of Office is installed.
Appreciate all the help I can get, thanks! Script: @echo off for /f "skip=1 tokens=3 delims= " %%a in ( 'reg query "HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Office\Click ToRun\Configuration" /v VersionToReport' ) do ( set "VersionToReport=%%~a" ) IF "%VersionToReport%" EQU "16.0.10396.20023" ( echo hello ) else ( echo heyo ) |
Tags |
batch, script |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Edszx | Word VBA | 2 | 05-27-2019 11:16 PM |
Registry issue | GaryTayman | Windows | 1 | 07-19-2017 01:37 AM |
Query and Power Query not working Excel 2016 | bl10 | Excel | 0 | 07-22-2016 06:25 PM |
![]() |
BridgeJ | Office | 1 | 01-13-2011 04:22 AM |