1/ spaces in MSI filenames
- Code: Select all
:InstMSI
...
if exist "%~dpn1.mst" (
echo Installing %1 using %~dpn1.mst...
@%SystemRoot%\System32\msiexec.exe /i %1 TRANSFORMS="%~dpn1.mst" /passive /norestart /log "%SystemRoot%\Temp\%~n1.log"
2/ avoid confusion on partial name
the msi directory contains the following packages : 7z920-x64.msi and 7z920.msi.
an entry "7z920-x64.msi" in the "%SystemRoot%\Temp\wouselmsi.txt" launch installation of both package because the string "7z920" (cf /I "%%~ni") is in "7z920-x64.msi". To avoid confusion, the test uses the filename with its extension .
- Code: Select all
:Proceed
...
%SystemRoot%\System32\find.exe /I "%%~nxi" %SystemRoot%\Temp\wouselmsi.txt >nul 2>&1
...
Regards
Frédéric MEZOU