Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
5.3 KiB

  1. -------------------------------------------------------------------------------
  2. CSCPIN.EXE - Description
  3. This utility is intended to supplement the "administratively assigned offline
  4. files" policy shipped for Offline Files in Windows 2000. This policy is
  5. accessed through the following paths in the Group Policy Editor (gpedit.msc).
  6. 1. Computer Config\Admin Templates\Windows Components\Network\Offline Files
  7. 2. User Config\Admin Templates\Windows Components\Network\Offline Files
  8. First, what is administrative pinning (aka admin pinning) and why do
  9. we need this utility?
  10. This is a feature by which administrators can designate one or more files
  11. or folders to always be available offline. Currently in Windows 2000 this
  12. is performed through system policy as described above. However, there are
  13. some known problems with the Windows 2000 implementation that occur when
  14. multiple people are sharing a computer and admin-pinning is specified in
  15. user policy. The way the implementation was designed, only the intesection
  16. of the set of files admin-pinned for all users remains pinned. When user
  17. policy is applied for any one user, all admin-pinned files NOT listed in that
  18. user's policy will be unpinned and removed from the cache.
  19. Another significant problem with admin pinning in Windows 2000 is that it
  20. is performed silently whenever policy is applied (without progress UI) on
  21. a background thread in explorer.exe. Therefore, there is no way, other
  22. than the disk activity indicator, to determine when the operation is complete.
  23. These issues will be addressed in future versions of Windows. cscpin.exe
  24. was created to to provide an interim solution.
  25. cscpin runs as a console application, displaying it's output to
  26. either the console or to a log file. This allows the operator to know
  27. exactly when the operation starts and finishes.
  28. **************************************
  29. * IMPORTANT NOTE *
  30. **************************************
  31. cscpin will not run if the admin-pin policy is active. This is to
  32. prevent unwanted interactions between the existing policy code and
  33. cscpin. The admin-pin policy must be either "not configured" or
  34. "disabled" prior to using cscpin. It is recommended that either
  35. policy or cscpin be used for admin-pinning of files, but not both.
  36. cscpin offers several options through the command line as follows:
  37. cscpin [<filename> | -F <listfile>] [-P | -U] [-V] [-L <logfile>]
  38. All options may be specified in upper or lower case and may be preceeded
  39. by either a dash ' - ' or slash ' / ' character.
  40. Typing "cscpin" with no options displays a usage description.
  41. <filename>
  42. This is the name of a single file or directory to be
  43. pinned or unpinned. The -P or -U option controls which operation
  44. is performed. A single <filename> cannot be specified if the -F
  45. option is provided.
  46. -F <listfile>
  47. This option allows you to provide a list of files and
  48. directories in a separate file. The file uses the standard Windows
  49. INI file format with the following sections.
  50. [Default] - Files and folders listed in this section will be
  51. pinned or unpinned according to the -P or -U option provided
  52. on the command line. In the absence of -P or -U, the files
  53. will be unpinned.
  54. [Pin] - Files and folders listed in this section will be pinned.
  55. [Unpin] - Files and folders listed in this section will be unpinned.
  56. File paths may include embedded environment variable strings.
  57. File paths must be either UNC paths or paths containing a local drive
  58. letter mapped to a remote UNC path.
  59. File paths must be appended with a '=' character.
  60. Examples:
  61. [Pin]
  62. \\server\share\dir1\dir2\file=
  63. \\server\share\dir1\dir3=
  64. \\server\share\%username%=
  65. [Unpin]
  66. H:%username%= ; Where H is mapped to a remote UNC path.
  67. -P
  68. Sets the "default" action to pin files. Any file specified as
  69. <filename> and any file listed in the [Default] section of the
  70. <listfile> will be pinned. Only one of -P and -U can be specified.
  71. -U
  72. Sets the "default" action to unpin files. Any file specified as
  73. <filename> and any file listed in the [Default] section of the
  74. <listfile> will be unpinned. Only one of -U and -P can be specified.
  75. -V
  76. Turns on verbose output. By default, output is minimal with only
  77. significan progress indications and error messages being displayed.
  78. Verbose output displays messages for each file as they are pinned
  79. and unpinned.
  80. -L
  81. Redirects all output to the file specified in <logfile>. If this
  82. file cannot be created, output is automatically redirected to
  83. the console. By default, output is directed to the console.
  84. The program will return one of the following exit codes to the cmd
  85. interpreter.
  86. 0 means everything completed without error.
  87. < 0 means something went wrong and application did not complete.
  88. > 0 means application completed but not all items were processed.
  89. -6 Admin-pin policy is active
  90. -5 Insufficient memory
  91. -4 CSC not enabled
  92. -3 Can't find or open listfile
  93. -2 Single file (<filename>) not found
  94. -1 Invalid argument on cmd line
  95. 0 Success
  96. 1 Application aborted by user (ctrl-C, ctrl-Break, logoff etc)
  97. 2 One or more CSC errors occured. See log output.