extract zip files silently using batch file
<p>I have written the below bat file to extract the zip files. But this is not working when I execute it from Jenkins. I suspect that this is because since its trying to launch the copy UI and service is preventing from doing it as windows services dont allow to work with UIs. Is there a way to edit the below script to do the unzipping silently? If there are any other tools, please provide some example.</p>

<pre><code>    @echo off
FOR /D %%p IN ("%CD%\Setups\*.*") DO rmdir "%%p" /s /q

call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/ -Dartifact=k:update-service:1.0.3 -Ddest=Setups/Services/update-service.jar
call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/ -Dartifact=k:installer-prerequisites:1.0.0 -Ddest=Setups/PreRequisites/installer-prerequisites.zip -Dpackaging=zip
call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/ -Dartifact=k:-apps:1.0.0 -Ddest=Setups/Apps/-apps.zip -Dpackaging=zip
call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/ -Dartifact=k:mosquitto:1.0.0 -Ddest=Setups/mosquitto/mosquitto.zip -Dpackaging=zip
call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/ -Dartifact=k:ble-service:1.0 -Ddest=Setups/Services/ble-service.jar
for /r %%i in ("*.zip") do (
    Call :UnZipFile "%%~dpi" "%%~fi"
    del /S /Q "%%~fi"
)
exit \b

:UnZipFile &lt;ExtractTo&gt; &lt;newzipfile&gt;
    setlocal
    set vbs="%temp%\_.vbs"
    if exist "%vbs%" del /f /q "%vbs%"
     &gt;"%vbs%" echo Set fso = CreateObject("Scripting.FileSystemObject")
    &gt;&gt;"%vbs%" echo If NOT fso.FolderExists("%~1") Then
    &gt;&gt;"%vbs%" echo fso.CreateFolder("%~1")
    &gt;&gt;"%vbs%" echo End If
    &gt;&gt;"%vbs%" echo set objShell = CreateObject("Shell.Application")
    &gt;&gt;"%vbs%" echo set FilesInZip=objShell.NameSpace("%~2").items
    &gt;&gt;"%vbs%" echo objShell.NameSpace("%~1").CopyHere(FilesInZip)
    &gt;&gt;"%vbs%" echo Set fso = Nothing
    &gt;&gt;"%vbs%" echo Set objShell = Nothing
    cscript //nologo "%vbs%"
    if exist "%vbs%" del /f /q "%vbs%"
    endlocal
</code></pre>