-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtract-Icon-Batch-Process.bat
More file actions
60 lines (47 loc) · 1.71 KB
/
Extract-Icon-Batch-Process.bat
File metadata and controls
60 lines (47 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
setlocal enabledelayedexpansion
:: Batch process multiple executables
:: Edit the list of applications below
echo ====================================
echo Icon Extractor - Batch Processing
echo ====================================
echo.
:: Define your applications here (edit as needed)
:: Format: "AppName|C:\Path\To\App.exe"
set "Apps[0]=AdobeReader|C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe"
set "Apps[1]=Notepad++|C:\Program Files\Notepad++\notepad++.exe"
set "Apps[2]=7Zip|C:\Program Files\7-Zip\7zFM.exe"
set "Apps[3]=Chrome|C:\Program Files\Google\Chrome\Application\chrome.exe"
:: Set base output path
set "BaseOutputPath=C:\Packaging"
:: Process each application
set "index=0"
:loop
if defined Apps[%index%] (
:: Parse app name and path
for /f "tokens=1,2 delims=|" %%a in ("!Apps[%index%]!") do (
set "AppName=%%a"
set "AppPath=%%b"
echo.
echo Processing: !AppName!
echo Path: !AppPath!
:: Check if executable exists
if exist "!AppPath!" (
set "OutputPath=%BaseOutputPath%\!AppName!\SupportFiles"
:: Create output directory
if not exist "!OutputPath!" mkdir "!OutputPath!"
:: Extract icon
powershell.exe -ExecutionPolicy Bypass -NoProfile -File "%~dp0Extract-Icon.ps1" -SourceExe "!AppPath!" -OutputPath "!OutputPath!" -SaveAsIco
echo Completed: !AppName!
) else (
echo WARNING: Executable not found - !AppPath!
)
)
set /a index+=1
goto loop
)
echo.
echo ====================================
echo All applications processed!
echo ====================================
pause