- Windows Setup Log Files and Event Logs
- WindowsВ Setup Event Logs
- To view the WindowsВ Setup event logs
- To Export the log to a file
- File System Event Handler Делегат
- Определение
- Параметры
- Примеры
- Комментарии
- Методы расширения
- File System Watcher Class
- Definition
- Examples
- Remarks
- Copying and moving folders
- Events and Buffer Sizes
- Constructors
- Properties
- Methods
- Events
Windows Setup Log Files and Event Logs
Windows® Setup creates log files for all actions that occur during installation. If you are experiencing problems installing Windows, consult the log files to troubleshoot the installation.
WindowsВ Setup log files are available in the following directories:
Log file location | Description | |||||||
---|---|---|---|---|---|---|---|---|
Event Handler | Events Handled | Performs |
---|---|---|
OnChanged | Changed, Created, Deleted | Report changes in file attributes, created files, and deleted files. |
OnRenamed | Renamed | List the old and new paths of renamed files and folders, expanding recursively if needed. |
Events and Buffer Sizes
Note that several factors can affect which file system change events are raised, as described by the following:
Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by FileSystemWatcher.
The FileSystemWatcher can watch disks as long as they are not switched or removed. The FileSystemWatcher does not raise events for CDs and DVDs, because time stamps and properties cannot change. Remote computers must have one of the required platforms installed for the component to function properly.
Note that a FileSystemWatcher may miss an event when the buffer size is exceeded. To avoid missing events, follow these guidelines:
Increase the buffer size by setting the InternalBufferSize property.
Avoid watching files with long file names, because a long file name contributes to filling up the buffer. Consider renaming these files using shorter names.
Keep your event handling code as short as possible.
Constructors
Initializes a new instance of the FileSystemWatcher class.
Initializes a new instance of the FileSystemWatcher class, given the specified directory to monitor.
Initializes a new instance of the FileSystemWatcher class, given the specified directory and type of files to monitor.
Properties
Gets a value indicating whether the component can raise an event.
(Inherited from Component)
Gets the IContainer that contains the Component.
(Inherited from Component)
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component)
Gets or sets a value indicating whether the component is enabled.
Gets the list of event handlers that are attached to this Component.
(Inherited from Component)
Gets or sets the filter string used to determine what files are monitored in a directory.
Gets the collection of all the filters used to determine what files are monitored in a directory.
Gets or sets a value indicating whether subdirectories within the specified path should be monitored.
Gets or sets the size (in bytes) of the internal buffer.
Gets or sets the type of changes to watch for.
Gets or sets the path of the directory to watch.
Gets or sets an ISite for the FileSystemWatcher.
Gets or sets the object used to marshal the event handler calls issued as a result of a directory change.
Methods
Begins the initialization of a FileSystemWatcher used on a form or used by another component. The initialization occurs at run time.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Releases the unmanaged resources used by the FileSystemWatcher.
Releases all resources used by the Component.
(Inherited from Component)
Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources.
Ends the initialization of a FileSystemWatcher used on a form or used by another component. The initialization occurs at run time.
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Releases the resources held by the current instance.
Serves as the default hash function.
(Inherited from Object)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component)
Gets the Type of the current instance.
(Inherited from Object)
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Creates a shallow copy of the current Object.
(Inherited from Object)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject)
Raises the Changed event.
Raises the Created event.
Raises the Deleted event.
Raises the Error event.
Raises the Renamed event.
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
Returns a string that represents the current object.
(Inherited from Object)
A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor.
A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor and the time (in milliseconds) to wait before timing out.
Events
Occurs when a file or directory in the specified Path is changed.
Occurs when a file or directory in the specified Path is created.
Occurs when a file or directory in the specified Path is deleted.
Occurs when the component is disposed by a call to the Dispose() method.
(Inherited from Component)
Occurs when the instance of FileSystemWatcher is unable to continue monitoring changes or when the internal buffer overflows.
Occurs when a file or directory in the specified Path is renamed.