-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtract-Icon-PNG.bat
More file actions
39 lines (30 loc) · 1.05 KB
/
Extract-Icon-PNG.bat
File metadata and controls
39 lines (30 loc) · 1.05 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
@echo off
setlocal enabledelayedexpansion
:: Extract icons as PNG files for Intune Company Portal
:: Drag and drop an executable onto this batch file or edit the paths below
echo ====================================
echo Icon Extractor - PNG Format
echo ====================================
echo.
:: Check if file was dragged onto batch file
if "%~1"=="" (
echo No file specified. Please drag and drop an executable onto this batch file.
echo.
echo Or edit this batch file to specify the source executable path.
pause
exit /b 1
)
:: Set the source executable
set "SourceExe=%~1"
:: Set output path (change this to your packaging directory)
set "OutputPath=%~dp0Icons"
:: Create output directory if it doesn't exist
if not exist "%OutputPath%" mkdir "%OutputPath%"
echo Source: %SourceExe%
echo Output: %OutputPath%
echo.
:: Run PowerShell script
powershell.exe -ExecutionPolicy Bypass -NoProfile -File "%~dp0Extract-Icon.ps1" -SourceExe "%SourceExe%" -OutputPath "%OutputPath%" -SaveAsPng
echo.
echo Done! Check output folder: %OutputPath%
pause