gerne präsentiere ich euch mein Updater Script. Es ist aber sehr speziell und bedarf (wenn ihr es denn für eure Zwecke nutzen möchtet) sicherlich noch ein paar Anpassungen.
Zur Erklärung:
fast alle Apps die von mir genutzt werden sind die von PortableApps. Der GrundOrdner von PortableApps ist bei mir
C:\Users\mein Username\Downloads\PortableApps
Darin sind dann die Portable Apps wie z.B. VLCPortable und 7-ZipPortable, welche von dem Installationsprogramm mit Unterordnern (App, Data, Other) angelegt werden.
7Zip (in der 64bit Version) ist für mein Updater Script unerlässlich, weil das Script die aktuelle .exe des zu aktualiserenden Programms (im Beispiel als VLC Videolan von 3.0.21 auf 3.0.23) herunterlädt, entpackt, shrinkt (Language-Ordner und Dateien und ggf. noch mehr). Das entpacken übernimmt also 7Zip.
Bei PortableApps ist die VLC Videolan Version aktuell 3.0.21 und sagen wir mal so installiert und damit veraltet.
Dann kommt die Meldung bei Deskmodder: hey Leute, Version 3.0.23 ist gerade veröffentlicht. > Sofort stellt sich bei mir das Gefühl ein "haben wollen".
Flugs das nachfolgende Script angestoßen und die Sache ist in Windeseile erledigt. Sprich: die PortableApps Version von VLC Videolan ist auf dem Stand 3.0.23 und auch die AppInfo.ini (zu finden unter C:\Users\mein Username\Downloads\PortableApps\VLCPortable\App\AppInfo\Appinfo.ini) ist entsprechend angepasst, damit der eingebaute Updater von PortableApps bei der nächsten Update-Suche Bescheid weiß, welche Version installiert ist.
Wenn das Script gestartet wird, schaut es zunächst bei Winget vorbei, welche Version dort gelistet ist und zeigt die Versionsnummer an. Dummerweise ist das bei Winget Stand heute (23.12.25) auch nicht die aktuelle Version, sonst würde das Script vollautomatisch die Versionsnummer übernehmen und die Aktualisierung damit ausführen. Man hat jetzt 10 Sekunden Zeit:
unternimmt man nichts oder drückt "J" für JA wird die Winget Version 3.0.22 heruntergelden und installiert. Wir wissen aber ja, dass es bereits eine noch neuere Verion gibt und drücken "M" für manuelle Versionseingabe. Geben also 3.0.23 ein und betätigen anschließend die Enter-Taste. Der Rest geschieht dann vollautomatisch:
- Download VLC Version 3.0.23
- entpacken mit 7-Zip
- Sprachpakete alle außer DE für deutsch entfernen
- die vorherige VLC Version aus dem PortableApps Ordner löschen
- die verschlankte VLC Installation in das PortableApps verzeichnis kopieren
- aufräumen
- VLC Portable starten
klingt kompliziert? Ist es aber nicht. Script aufrufen, einmal "M" drücken, 3.0.23 eingeben und enter. fertisch!!
Im besten Fall (Winget hält die korrekte Versionsnummer schon vor), muss man nach dem Aufruf gar nichts mehr machen.
VLC Download entpacken und kopieren_X64.cmd
Code: Alles auswählen
@echo off
COLOR 0a
chcp 1252 >nul
:Admin
cls
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params= %*
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%homepath%\Downloads\PortableApps\VLCPortable\vlcX64.exe" goto extract
pushd "%CD%" >nul 2>&1
CD /D "%~dp0" >nul 2>&1
CLS
rem ======= WINGET: Version ermitteln =======
set "APPNAME=VideoLAN.VLC"
set "VERSION="
for /f "tokens=2 delims=:" %%v in ('
winget show --id "%APPNAME%" --exact --source winget --disable-interactivity ^| findstr /b /c:"Version:"
') do (
set "VERSION=%%v"
)
:: f hrende Leerzeichen trimmen
for /f "tokens=* delims= " %%A in ("%VERSION%") do set "VERSION=%%A"
:: VERSION -> VER/ver exportieren, dann local-Scope beenden
endlocal & (
set "VER=%VERSION%"
set "ver=%VERSION%"
)
:: Wenn Winget nichts gefunden hat, direkt zur manuellen Eingabe
if not defined ver goto AskVersion
echo die von Winget gefundene Version ist %ver%
rem echo.
:: 10 Sekunden warten wenn keine Eingabe automatisch JA
choice /c JM /m "Version %ver% wird automatisch in 10 Sekunden heruntergeladen; M fuer manuelle Versionseingabe (J/M): " /T 10 /D J
if errorlevel 2 goto AskVersion
if errorlevel 1 goto next
:AskVersion
cls
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo.
Echo bitte jetzt die Versionsnummer eingeben z.b. 3.0.23
Echo.
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo Eingabe der Versionsnummer und mit Enter-Taste fortfahren:
set /p ver=
echo Version %ver% wird jetzt verwendet
timeout /t 5 >nul 2>&1
:next
powershell -noprofile "Start-BitsTransfer -DisplayName VLC "https://artifacts.videolan.org/vlc/release-win64/vlc-%ver%-win64.exe"
taskkill /f /im vlc.exe > NUL 2>&1
taskkill /f /im vlc-cache-gen.exe > NUL 2>&1
taskkill /f /im PortableAppsPlatform.exe > NUL 2>&1
rmdir "C:\vlc_X64" /s /q > NUL 2>&1
mkdir C:\vlc_X64
cd C:\vlc_x64
if exist "%~dp0vlc-*-win64.exe" ren "%~dp0vlc-*-win64.exe" vlcX64.exe
:extract
if not exist "%~dp0vlcX64.exe" goto Fehler
"%homepath%\Downloads\PortableApps\7-ZipPortable\App\7-Zip64\7z.exe" X "%~dp0vlcX64.exe"
forfiles /P ".\locale" /M af /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M am /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ar /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M as /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M af /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ast /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M be /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M br /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M brx /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bs /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca-valencia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M dgo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M dz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M el /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M eo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M et /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M eu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ga /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gd /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gug /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M he /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hsb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M id /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ie /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ka /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kab /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kmr-Latn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kok /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ks /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lv /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mai /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ml /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mni /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M my /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ne /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nso /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M oc /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M om /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pa-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M rw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sa-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sat /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sd /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M si /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sid /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sm /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sq /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sr-latn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ss /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M st /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw-tz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ta /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M te /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M th /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ts /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ug /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M uk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M uz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ve /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M vec /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M xh /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ach /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M an /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M as_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M az /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cgg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ckb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M co /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cs /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M da /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M en_GB /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M es /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ff /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fur /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M is /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M it /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ja /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M km /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ko /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ks_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ky /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ms /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ps /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pt_BR /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pt_pt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ro /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ru /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sv /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tet /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M vi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M wa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zh_CN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zh_TW /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M am_ET /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca@valencia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M es_MX /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ku_IQ /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ie /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sm /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
rmdir "%homepath%\Downloads\PortableApps\VLCPortable\App\VLC\" /s /q > NUL 2>&1
XCOPY /y "C:\vlc_x64\"* "%homepath%\Downloads\PortableApps\VLCPortable\App\VLC\" /s /i
del "%~dp0vlcX64.exe" /f /q > NUL 2>&1
cd c:\
rmdir /s /q "C:\vlc_x64\" > NUL 2>&1
@echo off
setlocal enabledelayedexpansion
set dir=%homepath%\Downloads\PortableApps\VLCPortable
:: Pfad zur .ini-Datei
set "iniPath=%dir%\App\AppInfo\AppInfo.ini"
set "newPackageVersion=%ver%.0"
set "newDisplayVersion=%ver%"
set "tempFile=%iniPath%.tmp"
(
for /f "usebackq delims=" %%i in ("%iniPath%") do (
set "line=%%i"
if "!line:PackageVersion=!" NEQ "!line!" (
echo PackageVersion=%newPackageVersion%
) else if "!line:DisplayVersion=!" NEQ "!line!" (
echo DisplayVersion=%newDisplayVersion%
) else (
echo !line!
)
)
) > "%tempFile%"
move /y "%tempFile%" "%iniPath%" >nul
rem start "" "%homepath%\Downloads\PortableApps\PortableApps.com\PortableAppsPlatform.exe"
start "" "%homepath%\Downloads\PortableApps\VLCPortable\VLCPortable.exe"
exit
:Fehler
Echo es konnte keine VLC Installationsdatei heruntergeladen bzw. gefunden werden
pause >nul
oder direkt Download:
Endung von .txt in .cmd vornehmen
Das Script ggf. noch anpassen: Ordner für eure portable VLC Version und 7-zip an der richtigen Stelle.
gerne präsentiere ich euch mein Updater Script. Es ist aber sehr speziell und bedarf (wenn ihr es denn für eure Zwecke nutzen möchtet) sicherlich noch ein paar Anpassungen.
Zur Erklärung:
fast alle Apps die von mir genutzt werden sind die von PortableApps. Der GrundOrdner von PortableApps ist bei mir
C:\Users\mein Username\Downloads\PortableApps
Darin sind dann die Portable Apps wie z.B. VLCPortable und 7-ZipPortable, welche von dem Installationsprogramm mit Unterordnern (App, Data, Other) angelegt werden.
7Zip (in der 64bit Version) ist für mein Updater Script unerlässlich, weil das Script die aktuelle .exe des zu aktualiserenden Programms (im Beispiel als VLC Videolan von 3.0.21 auf 3.0.23) herunterlädt, entpackt, shrinkt (Language-Ordner und Dateien und ggf. noch mehr). Das entpacken übernimmt also 7Zip.
Bei PortableApps ist die VLC Videolan Version aktuell 3.0.21 und sagen wir mal so installiert und damit veraltet.
Dann kommt die Meldung bei Deskmodder: hey Leute, Version 3.0.23 ist gerade veröffentlicht. > Sofort stellt sich bei mir das Gefühl ein "haben wollen".
Flugs das nachfolgende Script angestoßen und die Sache ist in Windeseile erledigt. Sprich: die PortableApps Version von VLC Videolan ist auf dem Stand 3.0.23 und auch die AppInfo.ini (zu finden unter C:\Users\mein Username\Downloads\PortableApps\VLCPortable\App\AppInfo\Appinfo.ini) ist entsprechend angepasst, damit der eingebaute Updater von PortableApps bei der nächsten Update-Suche Bescheid weiß, welche Version installiert ist.
Wenn das Script gestartet wird, schaut es zunächst bei Winget vorbei, welche Version dort gelistet ist und zeigt die Versionsnummer an. Dummerweise ist das bei Winget Stand heute (23.12.25) auch nicht die aktuelle Version, sonst würde das Script vollautomatisch die Versionsnummer übernehmen und die Aktualisierung damit ausführen. Man hat jetzt 10 Sekunden Zeit:
unternimmt man nichts oder drückt "J" für JA wird die Winget Version 3.0.22 heruntergelden und installiert. Wir wissen aber ja, dass es bereits eine noch neuere Verion gibt und drücken "M" für manuelle Versionseingabe. Geben also 3.0.23 ein und betätigen anschließend die Enter-Taste. Der Rest geschieht dann vollautomatisch:
- Download VLC Version 3.0.23
- entpacken mit 7-Zip
- Sprachpakete alle außer DE für deutsch entfernen
- die vorherige VLC Version aus dem PortableApps Ordner löschen
- die verschlankte VLC Installation in das PortableApps verzeichnis kopieren
- aufräumen
- VLC Portable starten
klingt kompliziert? Ist es aber nicht. Script aufrufen, einmal "M" drücken, 3.0.23 eingeben und enter. fertisch!!
Im besten Fall (Winget hält die korrekte Versionsnummer schon vor), muss man nach dem Aufruf gar nichts mehr machen.
VLC Download entpacken und kopieren_X64.cmd
[code]@echo off
COLOR 0a
chcp 1252 >nul
:Admin
cls
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params= %*
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%homepath%\Downloads\PortableApps\VLCPortable\vlcX64.exe" goto extract
pushd "%CD%" >nul 2>&1
CD /D "%~dp0" >nul 2>&1
CLS
rem ======= WINGET: Version ermitteln =======
set "APPNAME=VideoLAN.VLC"
set "VERSION="
for /f "tokens=2 delims=:" %%v in ('
winget show --id "%APPNAME%" --exact --source winget --disable-interactivity ^| findstr /b /c:"Version:"
') do (
set "VERSION=%%v"
)
:: f hrende Leerzeichen trimmen
for /f "tokens=* delims= " %%A in ("%VERSION%") do set "VERSION=%%A"
:: VERSION -> VER/ver exportieren, dann local-Scope beenden
endlocal & (
set "VER=%VERSION%"
set "ver=%VERSION%"
)
:: Wenn Winget nichts gefunden hat, direkt zur manuellen Eingabe
if not defined ver goto AskVersion
echo die von Winget gefundene Version ist %ver%
rem echo.
:: 10 Sekunden warten wenn keine Eingabe automatisch JA
choice /c JM /m "Version %ver% wird automatisch in 10 Sekunden heruntergeladen; M fuer manuelle Versionseingabe (J/M): " /T 10 /D J
if errorlevel 2 goto AskVersion
if errorlevel 1 goto next
:AskVersion
cls
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo.
Echo bitte jetzt die Versionsnummer eingeben z.b. 3.0.23
Echo.
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo Eingabe der Versionsnummer und mit Enter-Taste fortfahren:
set /p ver=
echo Version %ver% wird jetzt verwendet
timeout /t 5 >nul 2>&1
:next
powershell -noprofile "Start-BitsTransfer -DisplayName VLC "https://artifacts.videolan.org/vlc/release-win64/vlc-%ver%-win64.exe"
taskkill /f /im vlc.exe > NUL 2>&1
taskkill /f /im vlc-cache-gen.exe > NUL 2>&1
taskkill /f /im PortableAppsPlatform.exe > NUL 2>&1
rmdir "C:\vlc_X64" /s /q > NUL 2>&1
mkdir C:\vlc_X64
cd C:\vlc_x64
if exist "%~dp0vlc-*-win64.exe" ren "%~dp0vlc-*-win64.exe" vlcX64.exe
:extract
if not exist "%~dp0vlcX64.exe" goto Fehler
"%homepath%\Downloads\PortableApps\7-ZipPortable\App\7-Zip64\7z.exe" X "%~dp0vlcX64.exe"
forfiles /P ".\locale" /M af /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M am /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ar /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M as /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M af /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ast /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M be /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M br /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M brx /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bs /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca-valencia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M dgo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M dz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M el /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M eo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M et /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M eu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ga /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gd /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M gug /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M he /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hsb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M id /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ie /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ka /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kab /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kmr-Latn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M kok /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ks /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lo /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lv /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mai /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ml /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mni /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M my /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ne /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nso /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M oc /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M om /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pa-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M rw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sa-in /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sat /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sd /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M si /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sid /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sm /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sq /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sr-latn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ss /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M st /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw-tz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ta /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M te /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M th /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ts /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ug /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M uk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M uz /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ve /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M vec /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M xh /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ach /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M an /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M as_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M az /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M bn_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cgg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ckb /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M co /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M cs /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M da /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M en_GB /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M es /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ff /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M fur /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hu /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M hy /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M is /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M it /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ja /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M km /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ko /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ks_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ky /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lg /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M lt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M mn /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ms /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M nl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ps /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pt_BR /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M pt_pt /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ro /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ru /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sk /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sv /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tet /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tl /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M tr /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M vi /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M wa /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zh_CN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M zh_TW /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M am_ET /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ca@valencia /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M es_MX /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ku_IQ /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M ie /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M or_IN /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sm /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
forfiles /P ".\locale" /M sw /C "cmd /c if @isdir==TRUE rmdir /s /q @file" > NUL 2>&1
rmdir "%homepath%\Downloads\PortableApps\VLCPortable\App\VLC\" /s /q > NUL 2>&1
XCOPY /y "C:\vlc_x64\"* "%homepath%\Downloads\PortableApps\VLCPortable\App\VLC\" /s /i
del "%~dp0vlcX64.exe" /f /q > NUL 2>&1
cd c:\
rmdir /s /q "C:\vlc_x64\" > NUL 2>&1
@echo off
setlocal enabledelayedexpansion
set dir=%homepath%\Downloads\PortableApps\VLCPortable
:: Pfad zur .ini-Datei
set "iniPath=%dir%\App\AppInfo\AppInfo.ini"
set "newPackageVersion=%ver%.0"
set "newDisplayVersion=%ver%"
set "tempFile=%iniPath%.tmp"
(
for /f "usebackq delims=" %%i in ("%iniPath%") do (
set "line=%%i"
if "!line:PackageVersion=!" NEQ "!line!" (
echo PackageVersion=%newPackageVersion%
) else if "!line:DisplayVersion=!" NEQ "!line!" (
echo DisplayVersion=%newDisplayVersion%
) else (
echo !line!
)
)
) > "%tempFile%"
move /y "%tempFile%" "%iniPath%" >nul
rem start "" "%homepath%\Downloads\PortableApps\PortableApps.com\PortableAppsPlatform.exe"
start "" "%homepath%\Downloads\PortableApps\VLCPortable\VLCPortable.exe"
exit
:Fehler
Echo es konnte keine VLC Installationsdatei heruntergeladen bzw. gefunden werden
pause >nul[/code]
oder direkt Download:
Endung von .txt in .cmd vornehmen
Das Script ggf. noch anpassen: Ordner für eure portable VLC Version und 7-zip an der richtigen Stelle.