summaryrefslogtreecommitdiffstats
path: root/content/posts/unattended-installation-of-webp-codec.md
diff options
context:
space:
mode:
authorbreadcat2020-06-19 12:23:15 +0100
committerbreadcat2020-06-19 12:23:15 +0100
commit70bb5d5a801428b0fb390abf79f19ffcf5e29c67 (patch)
treeb9fd7990156bd58bc38d58f91829c05933215102 /content/posts/unattended-installation-of-webp-codec.md
parent0f9a31348079c0a061bcc194912e75cc1c07bc1f (diff)
downloadblog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.tar.gz
blog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.tar.bz2
blog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.zip
Simple migration of existing posts to hugo format
Diffstat (limited to 'content/posts/unattended-installation-of-webp-codec.md')
-rw-r--r--content/posts/unattended-installation-of-webp-codec.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/content/posts/unattended-installation-of-webp-codec.md b/content/posts/unattended-installation-of-webp-codec.md
new file mode 100644
index 0000000..af76d31
--- /dev/null
+++ b/content/posts/unattended-installation-of-webp-codec.md
@@ -0,0 +1,44 @@
+---
+title: "Unattended installation of WebP codec"
+date: 2020-05-26T16:48:00
+tags: ["snippets", "software", "windows"]
+---
+
+I wrote this up many, many moons ago. I wanted a way to install Google's WebP codec on Windows in an unattended fashion to complement my [just-install](https://just-install.github.io/) script.
+
+What I eventually came up with was the following:
+
+```
+rem cd to temp
+cd %temp%
+
+rem clean up old folders
+del %temp%\WebpCodecSetup.exe %temp%\7z1701.msi %temp%\.data %temp%\.rdata %temp%\.reloc %temp%\.text
+rd /s /q %temp%\7z1701 %temp%\.rsrc
+
+rem download installer
+bitsadmin /transfer installerDownload /download /priority normal https://storage.googleapis.com/downloads.webmproject.org/releases/webp/WebpCodecSetup.exe %temp%\WebpCodecSetup.exe
+
+rem download 7zip
+bitsadmin /transfer unpackDownload /download /priority normal http://www.7-zip.org/a/7z1701.msi %temp%\7z1701.msi
+
+rem unpack 7zip
+msiexec /a %temp%\7z1701.msi /qb TARGETDIR=%temp%\7z1701\
+
+rem unpack installer
+%temp%\7z1701\Files\7-Zip\7z.exe x %temp%\WebpCodecSetup.exe
+
+rem rename sources msis
+ren %temp%\.rsrc\0\MSIFILE\1 1.msi
+ren %temp%\.rsrc\0\MSIFILE\10 10.msi
+
+rem install msis
+msiexec /i %temp%\.rsrc\0\MSIFILE\1.msi /quiet /qn /norestart
+msiexec /i %temp%\.rsrc\0\MSIFILE\10.msi /quiet /qn /norestart
+
+rem clean up used folders
+del %temp%\WebpCodecSetup.exe %temp%\7z1701.msi %temp%\.data %temp%\.rdata %temp%\.reloc %temp%\.text
+rd /s /q %temp%\7z1701 %temp%\.rsrc
+```
+
+The script will download the installer, and 7zip to do the unpacking, then delete everything afterwards. \ No newline at end of file