?? ?? SFX ????? ????
Aspose.zip? ???? SFX (Self Extracting) ????? ?? ? ????. ??? ???? ?? ?????? ??? ??? ?? ?????. ? ? ???? ?? ?? ??? ?? ? ? ????.
?? ?? ?? ????
?? ?? ???? ???? ???? Selfextractoroptions? ???? ??? ArchivesAveOptions? ?????.
1try (fileoutputStream ZipFile = ? FileOutputStream ( "archive.exe")) {
2 try (Archive Archive = new Archive ()) {
3 archive.createentry ( "entry.bin", "data.bin");
4 ArchivesAveOptions ?? = ? ???? aveOptions ();
5 Options.setSelfextractorOptions (new self -extractoroptions ());
6 Archive.save (zipfile, ??);
7 }
8} catch (ioException ex) {
9}?? ?? ???? ??
?? ? ????? ?? ???? .NET ??? ?? 2.0 ??? ?????. ??? ??? ???? Windows Vista ??? ?????.
? ? ???? ?? ?????? ????? ?? ? ?????? ?? ??? ? ????.
??? ????? ????-autoextract ?? ? ??? ??????. ??:
1C:\>archive.exe -autoExtract -password:T0p$ecret?? ?? ??????? ?? ? ??
| Option | Meaning | Sample |
|---|---|---|
| -autoExtract | Primary option - without it decompression does not start. Extraction starts automatically, other options apply. | sfx.exe -autoExtract |
| -autoClose | Window closes when the extraction is complete. This option only makes sense if -autoExtract option is present. | sfx.exe -autoExtract -autoClose |
| -forceOverwrite | Overwrites all existing files without prompt if there are any. This option only makes sense if -autoExtract option present. | sfx.exe -autoExtract -forceOverwrite |
| -password: | Provides a password to encrypted entries. This option only makes sense if -autoExtract option is present. If you have spaces within the password quote it. | sfx.exe -autoExtract -password:T0p$ecret |
| -destination: | Extracts files to the supplied directory. This option only makes sense if -autoExtract option is present. If you have spaces within the path quote it. | sfx.exe -autoExtract -destination:"C:\My Documents" |
? ??? ???? Windows?? ?? ????? ??? ? ????.