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
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "How to audit Visual C++ Runtime version usage"
3
-
description: "A detailed guide for auditing Visual C++ Runtime file usage."
2
+
title: Audit Visual C++ Runtime Version Usage
3
+
description: A detailed guide for auditing Visual C++ Runtime file usage.
4
4
ms.date: 1/27/2025
5
5
helpviewer_keywords:
6
6
[
@@ -12,26 +12,26 @@ ms.author: msaleh
12
12
ms.topic: how-to
13
13
---
14
14
15
-
# How to audit Visual C++ Runtime version usage
15
+
# Audit Visual C++ Runtime version usage
16
16
17
-
The Microsoft Visual C++ Redistributable and the Visual Studio C++ Runtime (collectively, "VC Runtime") are critical components of many applications. Across your network, machines may still be running applications that install and use an out-of-support version of the VC Runtime. You can use NTFS file auditing to identify such usage as a step towards replacing those applications with ones that use a supported version of the VC Runtime. This guide walks you through setting up NTFS file auditing, provides troubleshooting tips, and highlights the benefits of regular audits.
17
+
Microsoft Visual C++ Redistributable and Visual Studio C++ Runtime (collectively, "VC Runtime") are critical components of many applications. Across your network, machines might still be running applications that install and use an out-of-support version of the VC Runtime. You can use NTFS file auditing to identify such usage as a step toward replacing those applications with ones that use a supported version of the VC Runtime. This article walks you through setting up NTFS file auditing, provides troubleshooting tips, and highlights the benefits of regular audits.
18
18
19
19
For more information about the versions of VC Runtime that are no longer supported, see [Microsoft Visual C++ Redistributable latest supported downloads](latest-supported-vc-redist.md).
20
20
21
21
## Enable NTFS file auditing to determine VC Runtime usage
22
22
23
-
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).
23
+
This article 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 an application can use, this article also shows how to use the PowerShell [`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).
24
24
25
25
### Manually enable object access auditing on the system
26
26
27
-
Object access must be enabled before you enable filelevel auditing:
27
+
Object access must be enabled before you enable file-level auditing:
28
28
29
-
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**.
32
-
1. Close the **Local Group Policy Editor**.
32
+
1. Close **Local Group Policy Editor**.
33
33
34
-
Alternatively, you may use `auditpol.exe` to enable object access:
34
+
Alternatively, you can use `auditpol.exe` to enable object access:
35
35
36
36
1. List the current settings from the command line with `AuditPol.exe /get /category:"Object Access"`.
@@ -42,30 +42,30 @@ To monitor which process accesses a VC Runtime file, enable auditing on the VC R
42
42
43
43
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).
44
44
1. Select **Advanced**.
45
-
1. In the **Advanced Security Settings** dialog box, select the **Auditing** tab and then select **Continue**.
46
-
1. To add a new auditing rule, select **Add**. In the **Auditing Entry** dialog, select a principal, then type the name of the user or group you want to add such as **(Everyone)**, and then select **OK**.
47
-
1. In **Type**, select ensure that **Success** is selected.
45
+
1. In the **Advanced Security Settings** dialog, select the **Auditing** tab and then select **Continue**.
46
+
1. To add a new auditing rule, select **Add**. In the **Auditing Entry** dialog, select a principal, and then enter the name of the user or group that you want to add, such as **(Everyone)**. Then select **OK**.
47
+
1. In **Type**, ensure that **Success** is selected.
1.There should now be a new row in the **Auditing** entries matching what you have selected. Select **OK**.
50
-
1. In the **Properties**Dialog, select **OK**.
49
+
1.Observe that a new row in the **Auditing** entries matches what you selected. Select **OK**.
50
+
1. In the **Properties**dialog, select **OK**.
51
51
52
52
The audit rule is now enabled for the file.
53
53
54
54
### Manually review audit logs
55
55
56
-
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.
56
+
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.
57
57
58
-
1.Open the **Event Viewer** by pressing `Windows` + `R` to open the **Run** dialog. Then type`eventvwr.msc`, and press**Enter**.
59
-
1.Navigate to the **Security** logs in the **Event Viewer** by expanding **Windows Logs** > **Security**. The results pane lists security events.
60
-
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.
58
+
1.Select **Windows**+**R** to open the **Run** dialog. Then enter`eventvwr.msc` and select**Enter** to open **Event Viewer**.
59
+
1.Go to the **Security** logs in the **Event Viewer** by expanding **Windows Logs** > **Security**. The results pane lists security events.
60
+
1. Find the audit events by choosing **Filter Current Log...** in the **Actions** pane. To narrow down the events to **Event ID 4663 (Audit Success for the File System Category)**, enter **4663** in the **Includes/Excludes Event IDs** text box.
61
61
62
-
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)
62
+
For a File Access Auditing Event 4663 example, see [4663(S): An attempt was made to access an object](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663).
63
63
64
64
### Use PowerShell to audit VC Runtime usage
65
65
66
-
As an overview, updating File Auditing Permissions with PowerShell follows these steps:
66
+
To update file auditing permissions with PowerShell, follow these steps:
67
67
68
-
1. Define the [file system audit rule](/dotnet/api/system.security.accesscontrol.filesystemauditrule.-ctor) to apply to the file(s).
68
+
1. Define the [file system audit rule](/dotnet/api/system.security.accesscontrol.filesystemauditrule.-ctor) to apply to the files.
69
69
1. Obtain a file's security descriptor with [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl).
70
70
1.[Apply the audit rule](/dotnet/api/system.security.accesscontrol.filesystemsecurity.setaccessrule) to the security descriptor.
71
71
1. Apply the updated security descriptor on the original file with [`Set-Acl`](/powershell/module/microsoft.powershell.security/set-acl).
@@ -122,7 +122,7 @@ ForEach-Object {
122
122
123
123
### PowerShell: View file audit events
124
124
125
-
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:
125
+
PowerShell provides `Get-WinEvent` to get event records for various event logs, as shown in the following PowerShell code that lists all of the File Access Auditing Event 4663 records over the past 24 hours:
126
126
127
127
```powershell
128
128
function Get-AuditEntries {
@@ -171,27 +171,27 @@ ResourceAttributes : S:AI
171
171
172
172
### Next steps after auditing VC Runtime usage
173
173
174
-
After you have determined which processes are using the VC Runtime files, or which applications have installed the VC Redistributable, uninstall those applications or upgrade them to newer versions that don't depend on unsupported VC Runtimes.
174
+
After you determine which processes use the VC Runtime files, or which applications installed the Visual C++ Redistributable, uninstall those applications or upgrade them to newer versions that don't depend on unsupported VC Runtimes.
175
175
176
-
Some Microsoft applications require legacy versions of the VC Runtime. For details, see [Visual C++ Redistributable and runtime libraries FAQ | Microsoft Learn](/lifecycle/faq/visual-c-faq).
176
+
Some Microsoft applications require legacy versions of the VC Runtime. For more information, see the [Visual C++ Redistributable and Runtime libraries FAQ](/lifecycle/faq/visual-c-faq).
177
177
178
178
<aid="vcruntime_install_location"></a>
179
179
180
180
## VC Runtime installation locations
181
181
182
-
Here is where each version of the VC Runtime is installed:
182
+
The following table lists where each version of the VC Runtime is installed.
183
183
184
-
|**Visual Studio Version**|**Installed Location(s)**|
184
+
| Visual Studio version|Installed locations|
185
185
| ------------- | ------------- |
186
186
| Visual Studio 2013 (VC++ 12.0) |`%SystemRoot%\\System32, %SystemRoot%\\SysWOW64`|
187
187
| Visual Studio 2012 (VC++ 11.0) |`%SystemRoot%\\System32, %SystemRoot%\\SysWOW64`|
188
188
| Visual Studio 2010 (VC++ 10.0) |`%SystemRoot%\\System32, %SystemRoot%\\SysWOW64`|
189
189
| Visual Studio 2008 (VC++ 9.0) |`%SystemRoot%\\WinSxS\\Fusion`|
190
190
| Visual Studio 2005 (VC++ 8.0) |`%SystemRoot%\\WinSxS\\Fusion`|
191
191
192
-
## See also
192
+
## Related content
193
193
194
-
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)\
195
-
[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)\
196
-
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)\
197
-
[C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md)
194
+
-[Redistribute Visual C++ files](redistributing-visual-cpp-files.md)
195
+
-[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)
196
+
-[Lifecycle FAQ: Visual C++ Redistributable and Runtime libraries](/lifecycle/faq/visual-c-faq)
197
+
-[C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md)
description: "Learn more about: Redistributing an ATL application"
3
-
title: "Redistributing an ATL application"
2
+
title: Redistribute an ATL Application
3
+
description: Learn more about how to redistribute an ATL application.
4
4
ms.date: "11/04/2016"
5
5
helpviewer_keywords: ["ATL, redistributing", "redistributing ATL", "redistributing OLE DB templates", "OLE DB templates, redistributing"]
6
6
ms.assetid: 9a696b22-2345-43ec-826b-be7cb8cfd676
7
7
ms.topic: concept-article
8
8
---
9
-
# Redistributing an ATL application
9
+
# Redistribute an ATL application
10
10
11
-
Starting in Visual Studio 2012, Active Template Library (ATL) is a header-only library. ATL projects do not have a Dynamic Link to ATL option. No redistributable ATL library is required.
11
+
Beginning with Visual Studio 2012, Active Template Library (ATL) is a header-only library. ATL projects don't have a dynamic link to an ATL option. No redistributable ATL library is required.
12
12
13
-
If you redistribute an ATL executable application, you must register the .exe file (and any controls inside it) by issuing the following command:
13
+
If you redistribute an ATL executable application, you must register the `.exe` file (and any controls inside it). Use the following command:
14
14
15
15
```
16
16
filename /regserver
17
17
```
18
18
19
-
where `filename` is the name of the executable file.
19
+
The name of the executable file is `filename`.
20
20
21
-
In Visual Studio 2010, an ATL project can be built for a MinDependency or a MinSize configuration. A MinDependency configuration is what you get when you set the **Use of ATL** property to **Static Link to ATL** on the **General** property page and set the **Runtime Library** property to **Multi-threaded (/MT)** on the **Code Generation** property page (C/C++ folder).
21
+
In Visual Studio 2010, you can build an ATL project for a `MinDependency` or a `MinSize` configuration:
22
22
23
-
A MinSize configuration is what you get when you set the **Use of ATL** property to **Dynamic Link to ATL** on the **General** property page, or set the **Runtime Library** property to **Multi-threaded DLL (/MD)** on the **Code Generation** property page (C/C++ folder).
23
+
- To get a `MinDependency` configuration, on the **General** property page, set the **Use of ATL** property to **Static Link to ATL**. On the **Code Generation** property page (C/C++ folder), set the **Runtime Library** property to **Multi-threaded (/MT)**.
24
+
- To get a `MinSize` configuration, on the **General** property page, set the **Use of ATL** property to **Dynamic Link to ATL**. Or on the **Code Generation** property page (C/C++ folder), set the **Runtime Library** property to **Multi-threaded DLL (/MD)**.
24
25
25
-
MinSize makes the output file as small as possible but requires that ATL100.dll and Msvcr100.dll (if you selected the **Multi-threaded DLL (/MD)** option) are on the target computer. ATL100.dll should be registered on the target computer to ensure that all ATL functionality is present. ATL100.dll contains ANSI and Unicode exports.
26
+
`MinSize` makes the output file as small as possible but requires that `ATL100.dll` and `Msvcr100.dll` (if you selected the **Multi-threaded DLL (/MD)** option) are on the target computer. Register `ATL100.dll`on the target computer to ensure that all ATL functionality is present. `ATL100.dll` contains ANSI and Unicode exports.
26
27
27
-
If you build your ATL or OLE DB Templates project for a MinDependency target, you do not need to install and register ATL100.dll on the target computer, although you might get a larger program image.
28
+
If you build your ATL or OLE DB templates project for a `MinDependency` target, you don't need to install and register `ATL100.dll` on the target computer, although you might get a larger program image.
28
29
29
-
If you redistribute an ATL executable application, you must register the .exe file (and any controls inside it) by issuing the following command:
30
+
If you redistribute an ATL executable application, you must register the `.exe` file (and any controls inside it). Use the following command:
30
31
31
32
```
32
33
filename /regserver
33
34
```
34
35
35
-
where `filename` is the name of the executable file.
36
+
The name of the executable file is `filename`.
36
37
37
-
## See also
38
+
## Related content
38
39
39
-
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)
40
+
-[Redistribute Visual C++ files](redistributing-visual-cpp-files.md)
0 commit comments