Skip to content

Commit 3ca3f4b

Browse files
authored
Merge pull request #6280 from paulth1/redistributing-microsoft-c++-files
[AQ] edit pass: Redistributing microsoft c++ files
2 parents 6318e84 + 340189b commit 3ca3f4b

8 files changed

Lines changed: 272 additions & 267 deletions

docs/windows/latest-supported-vc-redist.md

Lines changed: 45 additions & 44 deletions
Large diffs are not rendered by default.

docs/windows/redist-version-auditing.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
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.
44
ms.date: 1/27/2025
55
helpviewer_keywords:
66
[
@@ -12,26 +12,26 @@ ms.author: msaleh
1212
ms.topic: how-to
1313
---
1414

15-
# How to audit Visual C++ Runtime version usage
15+
# Audit Visual C++ Runtime version usage
1616

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.
1818

1919
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).
2020

2121
## Enable NTFS file auditing to determine VC Runtime usage
2222

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).
2424

2525
### Manually enable object access auditing on the system
2626

27-
Object access must be enabled before you enable file level auditing:
27+
Object access must be enabled before you enable file-level auditing:
2828

29-
1. Open the **Local Group Policy Editor** by pressing `Windows` + `R` to open the **Run** dialog. Then type `gpedit.msc` and press **Enter**.
30-
1. Navigate to **Computer Configuration** > **Windows Settings** > **Security Settings** > **Advanced Audit Policy Configuration** > **System Audit Policies** > **Object Access**.
29+
1. Select **Windows**+**R** to open the **Run** dialog. Then enter `gpedit.msc` and select **Enter** to open **Local Group Policy Editor**.
30+
1. Go to **Computer Configuration** > **Windows Settings** > **Security Settings** > **Advanced Audit Policy Configuration** > **System Audit Policies** > **Object Access**.
3131
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**.
3333

34-
Alternatively, you may use `auditpol.exe` to enable object access:
34+
Alternatively, you can use `auditpol.exe` to enable object access:
3535

3636
1. List the current settings from the command line with `AuditPol.exe /get /category:"Object Access"`.
3737
1. Enable object access with `AuditPol.exe /set /category:"Object Access" /subcategory:"File System" /success:enable`.
@@ -42,30 +42,30 @@ To monitor which process accesses a VC Runtime file, enable auditing on the VC R
4242

4343
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).
4444
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.
4848
1. Select **Show advance permissions** > **Clear all** > **Traverse folder / execute file** > **OK**.
49-
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**.
5151

5252
The audit rule is now enabled for the file.
5353

5454
### Manually review audit logs
5555

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.
5757

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.
6161

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).
6363

6464
### Use PowerShell to audit VC Runtime usage
6565

66-
As an overview, updating File Auditing Permissions with PowerShell follows these steps:
66+
To update file auditing permissions with PowerShell, follow these steps:
6767

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.
6969
1. Obtain a file's security descriptor with [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl).
7070
1. [Apply the audit rule](/dotnet/api/system.security.accesscontrol.filesystemsecurity.setaccessrule) to the security descriptor.
7171
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 {
122122

123123
### PowerShell: View file audit events
124124

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:
126126

127127
```powershell
128128
function Get-AuditEntries {
@@ -171,27 +171,27 @@ ResourceAttributes : S:AI
171171

172172
### Next steps after auditing VC Runtime usage
173173

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.
175175

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).
177177

178178
<a id="vcruntime_install_location"></a>
179179

180180
## VC Runtime installation locations
181181

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.
183183

184-
| **Visual Studio Version**| **Installed Location(s)**|
184+
| Visual Studio version| Installed locations|
185185
| ------------- | ------------- |
186186
| Visual Studio 2013 (VC++ 12.0) | `%SystemRoot%\\System32, %SystemRoot%\\SysWOW64` |
187187
| Visual Studio 2012 (VC++ 11.0) | `%SystemRoot%\\System32, %SystemRoot%\\SysWOW64` |
188188
| Visual Studio 2010 (VC++ 10.0) | `%SystemRoot%\\System32, %SystemRoot%\\SysWOW64` |
189189
| Visual Studio 2008 (VC++ 9.0) | `%SystemRoot%\\WinSxS\\Fusion` |
190190
| Visual Studio 2005 (VC++ 8.0) | `%SystemRoot%\\WinSxS\\Fusion` |
191191

192-
## See also
192+
## Related content
193193

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)
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
---
2-
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.
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["ATL, redistributing", "redistributing ATL", "redistributing OLE DB templates", "OLE DB templates, redistributing"]
66
ms.assetid: 9a696b22-2345-43ec-826b-be7cb8cfd676
77
ms.topic: concept-article
88
---
9-
# Redistributing an ATL application
9+
# Redistribute an ATL application
1010

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.
1212

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:
1414

1515
```
1616
filename /regserver
1717
```
1818

19-
where `filename` is the name of the executable file.
19+
The name of the executable file is `filename`.
2020

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:
2222

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)**.
2425

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.
2627

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.
2829

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:
3031

3132
```
3233
filename /regserver
3334
```
3435

35-
where `filename` is the name of the executable file.
36+
The name of the executable file is `filename`.
3637

37-
## See also
38+
## Related content
3839

39-
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)
40+
- [Redistribute Visual C++ files](redistributing-visual-cpp-files.md)

0 commit comments

Comments
 (0)