8
I looked everywhere and couldn't find a straight answer from anyone.
If I want to package the contents of C:\Temp into a file called Temp.exe (in 7z format) that is self-extracting, how do I do it in a batch file?
This doesn't work:
"C:\Program Files\7-Zip\7z.exe" a -t7z -mx5 -sfx 7z.sfx directoryname archive.exe -mmt
What I get from that is a self extracting archive called 7z.sfx . Can't figure this out.
it needs to work on anyones system. since 7-zip installs to that directory by default on all windows systems, this makes the script much more likely to run on someone elses system. – djangofan – 2010-07-06T21:25:24.083
Then use one of the following environment variables: ProgramFiles= ProgramFiles(x86) – Mark Allen – 2010-07-06T21:53:33.900