You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/windows/redist-version-auditing.md
+11-15Lines changed: 11 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "How to audit Visual C++ Runtime version usage"
3
3
description: "A detailed guide for auditing Visual C++ Runtime file usage."
4
-
ms.date: 12/2/2024
4
+
ms.date: 1/27/2025
5
5
helpviewer_keywords:
6
6
[
7
7
"find redist version installed",
@@ -19,18 +19,16 @@ For more information about the versions of VC Runtime that are no longer support
19
19
20
20
## Enable NTFS file auditing to determine VC Runtime usage
21
21
22
-
You can use NTFS file auditing to determine which applications are calling the unsupported versions of the VC Runtime.
23
-
24
-
This guide provides the steps to manually enable NTFS file auditing and review audit events. Because there are several files that can be used by an application, this guide also shows how to use PowerShell's [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl) and [`Set-Acl`](/powershell/module/microsoft.powershell.security/set-acl) cmdlets to update auditing permissions. For more information about how to configure audit policies for a file, see [Apply a basic audit policy on a file or folder](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder).
22
+
This guide provides the steps to manually enable NTFS file auditing and review audit events to determine which applications are calling the unsupported versions of the VC Runtime. Because there are several files that can be used by an application, this guide also shows how to use PowerShell's [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl) and [`Set-Acl`](/powershell/module/microsoft.powershell.security/set-acl) cmdlets to update auditing permissions. For more information about how to configure audit policies for a file, see [Apply a basic audit policy on a file or folder](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder).
25
23
26
24
### Manually enable object access auditing on the system
27
25
28
26
Object access must be enabled before you enable file level auditing:
29
27
30
-
1. Open the Local Group Policy Editor by pressing Windows + R to open the **Run** dialog, then type `gpedit.msc`, and press Enter.
28
+
1. Open the **Local Group Policy Editor** by pressing `Windows` + `R` to open the **Run** dialog. Then type `gpedit.msc` and press **Enter**.
1. Double-click **Audit File System**. In the **Audit File System Properties** dialog, select **Configure the following audit events** > **Success** > **OK**.
33
-
1. Close the Group Policy Editor.
31
+
1. Close the **Local Group Policy Editor**.
34
32
35
33
Alternatively, you may use `auditpol.exe` to enable object access:
36
34
@@ -39,7 +37,7 @@ Alternatively, you may use `auditpol.exe` to enable object access:
39
37
40
38
### Manually enable auditing on a file
41
39
42
-
To monitor which process accesses a VC Runtime file, enable auditing on the file:
40
+
To monitor which process accesses a VC Runtime file, enable auditing on the VC Runtime file:
43
41
44
42
1. Right-click the file that you want to audit, select **Properties**, and then select the **Security** tab. For more information about finding installed VC Runtime files, see [VC Runtime installed locations](#vcruntime_install_location).
45
43
1. Select **Advanced**.
@@ -54,19 +52,17 @@ The audit rule is now enabled for the file.
54
52
55
53
### Manually review audit logs
56
54
57
-
NTFS file auditing generates ["Event 4663: An attempt was made to access an object"](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663) for each file that includes the audit permission and that is accessed by a process.
55
+
NTFS file auditing generates ["Event 4663: An attempt was made to access an object"](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663) for each file that includes the audit permission and is accessed by a process.
58
56
59
-
1. Open the Event Viewer by pressing `Windows` + `R` to open the **Run** dialog. Then type `eventvwr.msc`, and press Enter.
60
-
1. Navigate to the **Security** logs in the Event Viewer by expanding **Windows Logs** > **Security**. The results pane lists security events.
57
+
1. Open the **Event Viewer** by pressing `Windows` + `R` to open the **Run** dialog. Then type `eventvwr.msc`, and press **Enter**.
58
+
1. Navigate to the **Security** logs in the **Event Viewer** by expanding **Windows Logs** > **Security**. The results pane lists security events.
61
59
1. Find the audit events by choosing **Filter Current Log...** in the **Actions** pane. Narrow down the events to **Event ID 4663 (Audit Success for the File System Category)** by entering **4663 into the Includes/Excludes Event IDs** text box.
62
60
63
61
For an example of a File Access Auditing Event 4663, see ["4663(S): An attempt was made to access an object."](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663)
To update File Auditing Permissions with PowerShell:
65
+
As an overview, updating File Auditing Permissions with PowerShell follows these steps:
70
66
71
67
1. Define the [file system audit rule](/dotnet/api/system.security.accesscontrol.filesystemauditrule.-ctor) to apply to the file(s).
72
68
1. Obtain a file's security descriptor with [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl).
@@ -125,7 +121,7 @@ ForEach-Object {
125
121
126
122
### PowerShell: View file audit events
127
123
128
-
PowerShell provides `Get-WinEvent` to obtain event records for various event logs as shown in the following PowerShell code which lists all of the Auditing Event 4663 records over the past 24 hours:
124
+
PowerShell provides `Get-WinEvent` to get event records for various event logs as shown in the following PowerShell code that lists all of the Auditing Event 4663 records over the past 24 hours:
129
125
130
126
```powershell
131
127
function Get-AuditEntries {
@@ -182,7 +178,7 @@ Some Microsoft applications require legacy versions of the VC Runtime. For detai
182
178
183
179
## VC Runtime installation locations
184
180
185
-
The following is where each version of the VC Runtime is installed.
181
+
Here is where each version of the VC Runtime is installed:
186
182
187
183
|**Visual Studio Version**|**Installed Location(s)**|
0 commit comments