This shows you the differences between two versions of the page.
userspace:uninstaller [2016/11/23 07:33] duschgas |
userspace:uninstaller [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Uninstaller ====== | ||
- | Uninstaller\\ | ||
- | 23.11.2016\\ | ||
- | Script by [[http:// | ||
- | Comments and improvements welcome \\ | ||
- | |||
- | * Tested with opsi 4.0.6.3.5.1 2015/09/18 | ||
- | * Tested with Winst Version 4.11.2.5 | ||
- | * Tested with Windows 7 32\64bit | ||
- | |||
- | Für die Deinstallation von Software habe ich hier ein minimales Script mit der dazugehörigen Batch-Datei entworfen. | ||
- | Die Uninstall.ins kann jedem beliebigen Softwarepaket zugeführt werden. | ||
- | |||
- | Lediglich in der " | ||
- | Hier kann entweder der volle Name z.B. "Adobe Reader XI" oder nur " | ||
- | |||
- | Somit ist kein weiterer Code mehr notwendig. | ||
- | Getestet wurde die Deinstallation mit zahlreicher Software wie z.B. Adobe Reader, Microsoft Office, Frameworks, Mozilla Firefox, Google Chrome etc. | ||
- | |||
- | ==== uninstall.ins ==== | ||
- | |||
- | <code winst> | ||
- | [Initial] | ||
- | Message=Deinstalliere Adobe Reader | ||
- | StayOnTop=false | ||
- | |||
- | [Aktionen] | ||
- | DefVar $ProductId$ | ||
- | Set $ProductId$ | ||
- | |||
- | ShowBitmap " | ||
- | Files_copy / | ||
- | Winbatch_product_silent_uninstall / | ||
- | Files_delete | ||
- | |||
- | [Files_copy] | ||
- | copy -s " | ||
- | |||
- | [Winbatch_product_silent_uninstall] | ||
- | " | ||
- | |||
- | [Files_delete] | ||
- | del -sf " | ||
- | </ | ||
- | |||
- | ==== uninstaller.cmd ==== | ||
- | <code batch> | ||
- | @echo off | ||
- | SETLOCAL EnableDelayedExpansion | ||
- | wmic product get name | findstr NAME_DER_ANWENDUNG_ODER_TEIL> | ||
- | if not %errorlevel%==0 ( | ||
- | del tmp | ||
- | goto exit | ||
- | ) | ||
- | for /f " | ||
- | del tmp | ||
- | set val=%%1 | ||
- | set App=!val: | ||
- | echo !App! | ||
- | echo wmic product where name=" | ||
- | ) | ||
- | echo del %%0>> | ||
- | start cmd /c un.bat | ||
- | :exit | ||
- | @echo on | ||
- | </ |