Click here to Skip to main content
15,663,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?
sahabiswarup 10-Oct-12 7:51am    
do you want to create a folder while installing your application?
glennPattonWork3 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 .
glennPattonWork3 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

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.
Share this answer
glennPattonWork3 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)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900