Click here to Skip to main content
13,198,068 members (67,338 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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?
Posted 10-Oct-12 1:49am
biswarup88 10-Oct-12 7:51am
do you want to create a folder while installing your application?
glennPattonWork 10-Oct-12 8:00am
Yup, I need to create the folder tree so I have location for the data generated by the application, I can create one on the desktop strangely....
Sarvesh Kushwaha 10-Oct-12 8:25am
while installing your application way you can do this when your application
installed and when it runs first time you can create on first form load .
glennPattonWork 10-Oct-12 8:35am
Interesting idea, I have a look at that..... however there was a method that didn't use that.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
glennPattonWork 10-Oct-12 11:09am
Thanks for that, I did find the test project in a backup file and got the answer. Also that might reveal why a user using Windows 7 (on a Mac) might be having problems.
Thank You

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100