开发者

What is hook1 in an ActiveX INF file?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜