Директива CopyFiles INF - Копировать курсоры в папку не по умолчанию

502
David

Я использую этот шаблон INF который устанавливает курсоры в «C: \ Windows» с помощью DIRID 10. Моя проблема заключается в том, что я хочу установить курсоры в «C: \ NonSystemFolder» (в идеале, используя% SystemDrive%).

Я использовал сокращенную версию шаблона для проверки абсолютного пути DIRID и попытался передать в него переменную среды% SystemDrive%, чтобы он скопировал мой файл на системный диск (без папки). На самом деле он создал папку с именем «% SystemDrive%» по текущему пути и поместил мой файл в эту папку.

[Версия] подпись = "$ CHICAGO $"  [DefaultInstall] CopyFiles = Scheme.Cur  [DestinationDirs] Scheme.Cur = -1, "MyCursors"  [Scheme.Cur] Работает в Background.ani 

Я проверил неисчерпывающий список DIRID, которые Microsoft предоставляет на своем сайте, но, кроме -1 (абсолютный путь), любой другой идентификатор, кроме описанного, описывает то, что будет работать для меня. Как упоминалось ранее, хотя -1 ID не делает то, что я предполагал.

0

1 ответ на вопрос

0
David

Поэтому я перечитал документацию Microsoft по DIRID и обнаружил, что DIRID 24 был именно тем, что я искал. У описания была довольно странная формулировка, поэтому я сначала проигнорировал ее как подходящую для использования.

Вот пересмотренный шаблон INF для пользовательской папки на системном диске (обычно «C:»). Чтобы его можно было использовать для ваших конкретных курсоров, вам нужно изменить имена файлов в [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"