正在安装时创建文件夹.... [英] Creating a folder at installation....

查看:79
本文介绍了正在安装时创建文件夹....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
愚蠢的事情是我为此做了一个测试项目.我需要创建一个带有子文件夹的文件夹.我按照对测试应用程序执行的过程进行操作,但似乎不再起作用.该目录的路径是C驱动器(C:\)的根目录,它还需要一个用于存放数据C:\ folder \ subFolder的子文件夹,我在目标计算机上添加了文件系统,并在其中添加了可执行文件和ini文件(是的,已订购)使用一个!)在桌面和我的程序菜单上创建了快捷方式.现在我必须要创建文件夹,这是一个问题,我应该在哪里将其包含在在那里创建的用户桌面上,这告诉我我还没有走一百万英里.我只需要在C:\提示符下获取它,我找不到我上次找到信息的MSDN链接?

Hi All,
Stupid thing is I have done a test project for this it worked. I need to create a folder with a sub folder. I followed the procedure I did for the test app and it does not appear to work any more. The path for this directory is the root of the C drive (C:\) it also needs a sub folder for data C:\folder\subFolder, I have File System On Target Machine added the executable and the ini file (yes, ordered to use one!) created the shortcuts on the desktop and my programs menu. Now I have got to create the folders comes a problem, where do I include them at the users desktop there get created there which tells me I''m not a million miles away. I just need to get it at the C:\ prompt, I can''t find the MSDN link I found the info on last time?

推荐答案

可以尝试创建自定义操作.在自定义操作中,您可以启动常规C#代码,从而使用Directory.CreateDirectory文件.

其次,您还可以尝试添加自定义"文件夹(在目标计算机"上右键单击文件系统"),然后在文件夹的属性中指定"C:\"驱动器.

但是请注意,在某些系统中,需要管理权限才能在特殊文件夹中创建目录.
You can try to create a Custom Action. Inside the custom action you can kick off regular C# code, thus using the Directory.CreateDirectory files.

Second you can also try to add a Custom folder (right click File Systems on Target Machine), and in the properties of the folder specify the ''C:\'' drive.

However note that in some systems you need administrative permissions to create directories in special folders.


这篇关于正在安装时创建文件夹....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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