如何使用C#从已安装的安装文件中获取完整文件路径。 [英] How to Get Full File Path From Installed Setup file Using C#.

查看:65
本文介绍了如何使用C#从已安装的安装文件中获取完整文件路径。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i使用c#开发了一个wpf应用程序,在这个应用程序中,我从应用程序目录中获取Excel文件并成功执行。



创建安装文件后,我找不到文件路径,也无法在设置应用程序中显示文件。



我是使用以下代码。



string file_name = @.. \\..\\Adoorkuppam.xlsx;

Hi,

i developed one wpf application using c#, In this application i get Excel file from application directory and executed successfully.

After creating setup file i couldn't find file path and it couldn't show File in set up application.

I'm using following code.

string file_name = @"..\\..\\Adoorkuppam.xlsx";

推荐答案

您好,您可以使用 Environment.CurrentDirectory





问候,

CodeBlack
Hi, You may use Environment.CurrentDirectory


Regards,
CodeBlack


这篇关于如何使用C#从已安装的安装文件中获取完整文件路径。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆