Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @ECHO OFF
  2. SET Product="%~1"
  3. IF "%Product%" == "" GOTO :usage
  4.  
  5. IF EXIST "%Product%*.zip" DEL /F "%Product%*.zip"
  6.  
  7. FOR /F "USEBACKQ" %%F IN (`powershell -NoLogo -NoProfile -Command ^(Get-Item "%Product%.exe"^).VersionInfo.FileVersion`) DO (SET ProductVersion=%%F)
  8. ECHO Product File version: %ProductVersion%
  9. ECHO .
  10. "%ProgramFiles%\7-Zip\7z.exe" a -tzip "%Product%.%ProductVersion%.zip" *.exe *.dll *.pdb *.config
  11.  
  12. :exit
  13. exit 0
  14.  
  15. :usage
  16. ECHO " Usage: pack.cmd Name-Of-Product"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement