To address the slow startup of your VB6/COM application on Windows Server 2019/2022/2025 compared to 2016, consider the following recommendations:
- Code Integrity and WDAC: To minimize Code Integrity latency for signed but previously untrusted binaries, ensure that the root and intermediate CA chains are installed correctly. For WDAC/AppLocker, you can create allow rules scoped specifically to your application folder (e.g.,
C:\AppFolder\*.exe; *.dll; *.ocx) to reduce repeated policy checks. This can help maintain security while improving performance. - Microsoft Defender: For local signed VB6/COM apps, folder/process exclusions should generally be sufficient to avoid I/O overhead. However, you may want to review additional Defender settings such as MAPS and cloud-delivered protection to ensure they are not impacting app launch times. Implementing least-privilege exclusions can help balance performance and security effectively.
- Application Compatibility: To reduce AppCompat matching costs for legacy VB6 applications, consider adjusting PCA settings or known registry flags. Investigate any documented changes in Server 2019+ that could affect AppCompat activity compared to 2016, and apply recommended mitigations.
- COM Activation and Registry Probing: To minimize registry probing under
WOW6432Node\CLSID\TypeLib, ensure that your COM registration is optimized. This includes verifying that TypeLib references are minimized and that specificInprocServer32values are set correctly. There may be official guidance available on pre-warming or caching COM class information to improve performance. - Fusion and PublisherPolicy: For handling missing or non-required assemblies, you can use the
<publisherPolicy apply="no"/>directive in your app.config, along with binding redirects and codeBase settings to neutralize unnecessary probing. Check if newer Server builds increase PublisherPolicy checks and adjust accordingly.
For detailed guidance and best practices, consult official Microsoft documentation related to these topics, as they may provide further insights into optimizing performance for legacy VB6/COM applications on newer Windows Server versions.