Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- SET Product="%~1"
- IF "%Product%" == "" GOTO :usage
- IF EXIST "%Product%*.zip" DEL /F "%Product%*.zip"
- FOR /F "USEBACKQ" %%F IN (`powershell -NoLogo -NoProfile -Command ^(Get-Item "%Product%.exe"^).VersionInfo.FileVersion`) DO (SET ProductVersion=%%F)
- ECHO Product File version: %ProductVersion%
- ECHO .
- "%ProgramFiles%\7-Zip\7z.exe" a -tzip "%Product%.%ProductVersion%.zip" *.exe *.dll *.pdb *.config
- :exit
- exit 0
- :usage
- ECHO " Usage: pack.cmd Name-Of-Product"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement