Enhancement for TouchMSITree.cmd

Enhancement for TouchMSITree.cmd

Postby fmezou » 16.09.2014, 15:14

I do the following modifications in the TouchMSITree.cmd to taken into account spaces in MSI filenames, and avoid confusion on partial name (see below)

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
fmezou
 

Re: Enhancement for TouchMSITree.cmd

Postby WSUSUpdateAdmin » 16.09.2014, 16:25

Hi and welcome, Frédéric,

beautiful, thank you! :)
:arrow: http://trac.wsusoffline.net/browser/trunk (r614).

Regards
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Enhancement for TouchMSITree.cmd

Postby rbr555 » 02.10.2014, 13:48

Hello,

did not work in 9.4.1.

The 'msi' extension is missing in my wouselmsi.txt

wouselmsi.txt
Code: Select all
jdk1.7.0_67
jdk1.7.0_67_64bit
jre1.7.0_67_64bit


9.4.1 mit "%%~nxi"
C:\Windows\System32\find.exe /I "jdk1.7.0_67_64bit.msi" C:\Windows\Temp\wouselmsi.txt 1>nul 2>&1
versus
9.4 "%%~ni"
C:\Windows\System32\find.exe /I "jdk1.7.0_67_64bit" C:\Windows\Temp\wouselmsi.txt 1>nul 2>&1

Regards Ronald




Hello,

I found a workaround.

In "..\client\UpdateInstaller.au3" I changed
Code: Select all
$msipacks[$msicount] = GUICtrlCreateCheckbox(StringMid($line, StringInStr($line, "\", 2, -1) + 1, StringInStr($line, ".", 2, -1) - StringInStr($line, "\", 2, -1) - 1), $txtxpos + Mod($msicount, 2) * $txtwidth, $txtypos + BitShift($msicount, 1) * $txtheight, $txtwidth, $txtheight)
to
Code: Select all
$msipacks[$msicount] = GUICtrlCreateCheckbox(StringMid($line, StringInStr($line, "\", 2, -1) + 1, StringInStr($line, ".", 2, -1) - StringInStr($line, "\", 2, -1) + 4), $txtxpos + Mod($msicount, 2) * $txtwidth, $txtypos + BitShift($msicount, 1) * $txtheight, $txtwidth, $txtheight)

rebuild UpdateInstaller.exe

Side effect:
in UpdateInstaller.ini I must change all entries in the [MSI] section and add ".msi"

Kind regards
Ronald
Last edited by aker on 02.10.2014, 18:16, edited 1 time in total.
Reason: Merged posts
rbr555
 
Posts: 22
Joined: 04.01.2013, 12:00

Re: Enhancement for TouchMSITree.cmd

Postby WSUSUpdateAdmin » 04.10.2014, 18:21

Hi.

Thanks - fixed in v. 9.4.2.
Side effects on UpdateInstaller.ini entries will remain.

Sorry for this bug - I shouldn't have adopted a "foreign" modification without having tested it on my own. :x

Thanks again & kind regards
T. Wittrock
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38


Return to Verschiedenes / Miscellaneous

Who is online

Users browsing this forum: No registered users and 103 guests