Currently I've seen hooks created for activeX installer archives in an INF file that use "hook1" and "hook" (to the left of the = sign). I'm confused about the differences in the two. Here is an example:
[version]
signature="$CHICAGO$"
Adv开发者_如何学GoancedINF=2.0
[Setup Hooks]
hook1=hook1
[hook1]
run=msiexec.exe /i "%EXTRACT_DIR%\ccScanning_msi.msi" /qn
Shouldn't it read "hook=hook1"? Is the "hook1" to the left simply a user-defined name with no real usefulness or meaning? How am I supposed to read and understand this syntax/structure?
In [Setup Hooks] section you can use any name because the meaning is "hook name"="section name"
So basically your inf file could look like this:
[Setup Hooks]
myFirstHook=myFirstHook
mySecondHook=mySecondHook
[myFirstHook]
...
[mySecondHook]
...
In section that describes a file
[mydll.dll]
Version=1,2,3,4
hook=myFirstHook
you have to use "hook" because its meaning is "key:hook"="section name".
have you looked at the official documentation about this? it's available here: Using Hooks
精彩评论