(view source code of msiinfo.bat as plain text)
@ECHO OFF
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
IF "%~1"=="" GOTO Syntax
SETLOCAL
FOR /F "tokens=*" %%A IN ('REG Query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows"') DO (
SET Latest=%%A
)
FOR /F "skip=2 tokens=2*" %%A IN ('REG Query "%Latest%\WinSDKTools" /v InstallationFolder') DO (
IF EXIST "%%~B.\MsiInfo.exe" (
"%%~B.\MsiInfo.exe" %*
) ELSE (
ECHO MsiInfo.exe not found.
ENDLOCAL
GOTO Syntax
)
)
ENDLOCAL
GOTO:EOF
:Syntax
ECHO.
ECHO MsiInfo.bat, Version 1.00
ECHO Automaticaly run the latest version of MsiInfo.exe installed on the computer
ECHO.
ECHO Usage: MSIINFO msifile [ options ]
ECHO.
ECHO Type MSIINFO /? for more details on the options
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
IF "%OS%"=="Windows_NT" COLOR 00
page last modified: 2024-04-16; loaded in 0.0054 seconds