简体   繁体   English

C#-获取随机文件的Windows关联

[英]C# - get Windows association for a random file

In C#, I'm trying to take some random file selected by a user, and determine the Windows Association for the program. 在C#中,我尝试获取用户选择的一些随机文件,并确定该程序的Windows关联。

I'd like to use this to provide some helpful information to the user about the program which will run. 我想用它为用户提供一些有关将运行的程序的有用信息。

This is a portfolio tool where generic files can be attached to a record. 这是一个投资组合工具,可以将通用文件附加到记录。

1851520 is a similar question, and from that question C# AF_FileAssociations looks to have what you need. 1851520是一个类似的问题,从该问题来看, C#AF_FileAssociations似乎具有您所需要的。

Failing that, System File Association on Codeproject looks to have the code to retrieve file association info. 失败的是,Codeproject上的“ 系统文件关联 ”看起来具有用于检索文件关联信息的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM