Asked by:
[BATCH] MsiExec doesn't handle special folders '.' and '..'

Question
-
(as suggested on the original post https://social.technet.microsoft.com/Forums/windows/en-US/5ab4dadf-2dfe-49db-9a03-678f49b5eeac/batch-msiexec-doesnt-handle-special-folders-and-?forum=w7itproui I post my question here)
Hi,
I have a strange thing on 2 Windows 7 computers (not even tried on Windows 10).
When using a full path containing a '.' or '..' folder, the application fails to install the product but Inside the BATCH, all is working.
Let's have a look to my POC code :
@echo OFF cls echo [Initialisation] setlocal enabledelayedexpansion set g_strBatchPath=%~dp0 set g_strCurrentDirectory=%CD% set strLibreOfficeVersion=5.4.1.2 echo Batch path : %g_strBatchPath% echo Current path : %g_strCurrentDirectory% rem NON WORKING set strMsiFile=H:\_Maintenance\.\repository\LibreOffice_%strLibreOfficeVersion%_Win_x86.msi rem WORKING rem set strMsiFile=H:\_Maintenance\repository\LibreOffice_%strLibreOfficeVersion%_Win_x86.msi echo %strMsiFile% if EXIST "%strMsiFile%" ( echo MSI OK : %strMsiFile% ) msiexec /i "%strMsiFile%" /log "%TEMP%\Nolme_MsiExe.log" Pause
- The file presence check is working well Inside BATCH.
- I was able to reproduce the problem on 2 computers (full updates)
Does soemone have the same problem ?
Thanks,
Vincent
- Moved by Bill_Stewart Tuesday, November 7, 2017 10:18 PM We cannot troubleshoot script for user from afar
Wednesday, September 27, 2017 8:24 PM
All replies
-
Works for me.
\_(ツ)_/
Wednesday, September 27, 2017 8:43 PM -
:/
which OS / configuration ?
Wednesday, September 27, 2017 8:47 PM -
Win7 and Win 10
\_(ツ)_/
Wednesday, September 27, 2017 8:52 PM -
which build and language ?
(I've made a VM with Win 7 SP1 x86 Fr -Build 7601 and LibreOffice_5.3.4. Same problem.)
Wednesday, September 27, 2017 9:11 PM