Subversion Repositories autosfx

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
VIATHINKSOFT AUTOSFX
2
====================
3
 
4
Benefits
5
--------
6
 
7
* Compatible with WinRAR and other software (Stub is small enough)
8
* Compatible with Linux' UnZip (No Warnings!)
9
* Compatible with AuthentiCode
10
* Compatible with Windows 7
11
* Compatible with Windows 95
12
 
13
Current overhead
14
----------------
15
 
16
458 KB (Delphi 2006)
17
 
18
Structure of a ViaThinkSoft AutoSFX Archive
19
-------------------------------------------
20
 
21
1. Extractor [UPX'ed]
22
   includes DelZip190.dll (B4) as Resource
23
2. ZIP (Offset adjusted)
24
   File comment includes "ViaThinkSoft AutoSFX Archive"
25
3. Optional: Authenticode Certificate
26
 
27
Process
28
-------
29
 
30
1. Extract DelZip DLL into TempDir
31
2. Extract contents directly
32
3. Open the extracted data and/or execute special AutoRun.inf (see below)
33
4. Delete the DLL from TempDir
34
 
35
Behavior
36
--------
37
 
38
ZIP has 1 file
39
	=> Extract in the same directory as the SFX
40
	Is it a directory?
41
		=> Open the new directory in Windows Explorer
42
	is it a file?
43
		=> Open Windows Explorer and select the new file.
44
ZIP has 2+ files
45
	=> Create a directory with the name of the SFX and extract into it
46
	=> Open the new created directory in Windows Explorer
47
 
48
Semantic archive comment
49
------------------------
50
 
51
The extractor looks into the file comment to determinate the behavior
52
while unzipping. YOU can influence the behavior when creating your
53
ZIP files.
54
 
55
Following switches are possible:
56
 
57
  C_ASFX_CB_OVR = 'AutoSFX Conflict Behavior: Overwrite all';
58
  C_ASFX_CB_NEW = 'AutoSFX Conflict Behavior: Overwrite older';
59
  C_ASFX_CB_ASK = 'AutoSFX Conflict Behavior: Ask';
60
  C_ASFX_CB_AVO = 'AutoSFX Conflict Behavior: Avoid';
61
 
62
  C_ASFX_CP_BEF = 'AutoSFX Comment Presentation: Before extracting';
63
  C_ASFX_CP_AFT = 'AutoSFX Comment Presentation: After extracting';
64
  C_ASFX_CP_NON = 'AutoSFX Comment Presentation: None';
65
 
66
  C_ASFX_FC_THS = 'AutoSFX Extraction Target: Extract here';
67
  C_ASFX_FC_DSK = 'AutoSFX Extraction Target: Extract to Desktop';
68
  C_ASFX_FC_ASK = 'AutoSFX Extraction Target: Choose directory';
69
 
70
Special AutoRun.inf
71
-------------------
72
 
73
[AutoSFX]
74
Operation=open			; Part of ShellExecute. Usually 'open' or 'runass' (e.g. for admin privilegies)
75
FileName=AutoRun.exe		; The filename to be executed
76
Parameters=			; Optional parameters
77
Directory=			; Optional Working directory
78
ShowCmd=			; (See MSDN Reference) Usually WS_NORMAL or WS_HIDE
79
OpenUnzippedContent=true	; After we have opened the application, should we still show the extracted data in Windows Explorer? (Default behavior if not AutoRun is set)
80
 
81
More information about the first 5 values:
82
http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx
83
 
84
// It is forbidden that the AutoRun calls its own creator (the SFX again).
85
 
86
 
87
(C) 2010 ViaThinkSoft