INF CopyFiles 指令 - 将光标复制到非默认文件夹

INF CopyFiles 指令 - 将光标复制到非默认文件夹

我在用着此 INF 模板使用 DIRID 10 将光标安装到“C:\Windows”。我的问题是我想将光标安装在“C:\NonSystemFolder”上(理想情况下使用 %SystemDrive%)。

我使用模板的简化版本来测试绝对路径 DIRID,并尝试将环境变量 %SystemDrive% 传递给它,以便它将我的文件复制到系统驱动器中(没有文件夹)。它实际上所做的是在当前路径上创建一个名为“%SystemDrive%”的文件夹,并将我的文件放在该文件夹中。

[版本]
签名=“$芝加哥$”

[默认安装]
复制文件 = Scheme.Cur

[目的地目录]
Scheme.Cur = -1,"我的光标"

[方案.当前]
在 Background.ani 中工作

我检查了非详尽的 DIRID 列表Microsoft 在其网站中提供了该 ID,但除了 -1(绝对路径)之外,其他任何 ID 似乎都不适合我。但如前所述,-1 ID 并没有达到我预期的效果。

答案1

所以我重新阅读了微软DIRID 文档我发现 DIRID 24 正是我要找的。描述中有一个相当奇怪的措辞,所以一开始我并没有把它当做正确的选择。

这是系统驱动器(通常为“C:”)中自定义文件夹的修订版 INF 模板。为了将其用于您的特定光标,您需要更改 [Scheme.Cur] 和 [Strings] 下的文件名。添加了注释以使其更容易。

[Version]
signature="$CHICAGO$"

[DefaultInstall]
; DIRID 24 is used throughout the file. That is the same as %SystemDrive%.
; Lines starting with semicolons are comments and are here just to help with editing.
CopyFiles = Scheme.Cur, Scheme.Txt
AddReg    = Scheme.Reg


[DestinationDirs]
Scheme.Cur = 24,"%CUR_DIR%"
Scheme.Txt = 24,"%CUR_DIR%"

[Scheme.Reg]
; Don't mess with this!
HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%24%\%CUR_DIR%\%pointer%,%24%\%CUR_DIR%\%help%,%24%\%CUR_DIR%\%workback%,%24%\%CUR_DIR%\%busy%,%24%\%CUR_DIR%\%cross%,%24%\%CUR_DIR%\%Text%,%24%\%CUR_DIR%\%handwrt%,%24%\%CUR_DIR%\%unavailiable%,%24%\%CUR_DIR%\%Vert%,%24%\%CUR_DIR%\%Horz%,%24%\%CUR_DIR%\%Dgn1%,%24%\%CUR_DIR%\%Dgn2%,%24%\%CUR_DIR%\%move%,%24%\%CUR_DIR%\%alternate%,%24%\%CUR_DIR%\%link%"

[Scheme.txt]
; Put here text files that you want to copy to the folder containing your cursors.
; READ ME.txt ;<-sample

[Scheme.Cur]
; Here goes the list of file names of your cursors. Order is irrelevant.
aero_arrow.cur
aero_helpsel.cur
aero_working.ani
aero_busy.ani
aero_select.cur
aero_unavail.cur
aero_ns.cur
aero_ew.cur
aero_nwse.cur
aero_nesw.cur
aero_move.cur
aero_link.cur
aero_cross.cur
aero_pen.cur
aero_up.cur

[Strings]
; This is the relative folder where cursors are going to be copied.
CUR_DIR       = "MyCursors\Windows Aero"
; This is the name of your Scheme. The one that will show up in Mouse Properties
SCHEME_NAME   = "Windows Aero"
; All the names within quotation marks MUST MATCH with the file names in Scheme.Cur. String names to the left should match equivalent cursors in the right.
pointer       = "aero_arrow.cur"
help          = "aero_helpsel.cur"
workback      = "aero_working.ani"
busy          = "aero_busy.ani"
text          = "aero_select.cur"
unavailiable  = "aero_unavail.cur"
vert          = "aero_ns.cur"
horz          = "aero_ew.cur"
;dgn1 is the one going from top-left to bottom-right
dgn1          = "aero_nwse.cur"
;dgn2 is the one going from top-right to bottom-left
dgn2          = "aero_nesw.cur"
move          = "aero_move.cur"
link          = "aero_link.cur"
;cross or precision selection
cross         = "aero_cross.cur"
handwrt       = "aero_pen.cur"
alternate     = "aero_up.cur"

相关内容