I'm trying to set up a post build event in Visual Studio to zip the output of one of my installer projects. The issue is that the (Wix) installer project uses some tricks so that the output file is renamed to include the program version, but these tricks don't actually update the macros in VS, so I can't just directly invoke 7z in the build event.
What I'm trying to is run a batch file (or script directly from the build event) to do the renaming. It *should* be as simple as
...and when I run that directly from the command line, it works fine. But when I drop it in a batch file and try to run it, I get the error "~na.zip" "a" was unexpected at this time."
What am I missing?
What I'm trying to is run a batch file (or script directly from the build event) to do the renaming. It *should* be as simple as
Code:
for %a in (*.msi) do 7z a -tzip "%~na.zip" "%a"
...and when I run that directly from the command line, it works fine. But when I drop it in a batch file and try to run it, I get the error "~na.zip" "a" was unexpected at this time."
What am I missing?
