问题描述
我已经在c#Windows应用程序中完成了一个应用程序。在此,我创建了一个名为ACHWINAPP的项目。我已经编写了一些代码来获取所需的路径,如下所示:
I have done an application in c# windows application. In this i created a project with name ACHWINAPP. I have written some code to get the path that i required as follows
strFilePath = Directory.GetCurrentDirectory();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = strFilePath + "\\ACH\\";
但是当我为该项目创建安装程序并安装在目录中时,即某些F:\ i我收到未找到的错误ACH。
But when i create a setup for the project and installed in a direcotry namely some F:\ i am getting the error ACH as not found .
我需要的是当用户单击保存时,我要将文件保存在他安装了我的安装文件的目录中,文件夹名为ACH
任何
What i need is when user clicks on save i would like to save the file in the directory where he installed my setup file with the folder name ACHAny Idea please..
推荐答案
您的意思是:
Application.StartupPath
可能不是您想要的...但是可执行文件所在的文件夹
Might not be what you want... but its the folder from which your executable is located
链接:
这篇关于如何在应用程序安装目录中创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!