Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# installer
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 2:49am
Comments
biswarup88 at 10-Oct-12 7:51am
   
do you want to create a folder while installing your application?
glennPattonWork at 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 at 10-Oct-12 8:25am
   
while installing your application ..one way you can do this when your application
installed and when it runs first time you can create on first form load .
glennPattonWork at 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
good
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.
  Permalink  
Comments
glennPattonWork at 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
0 OriginalGriff 431
1 Afzaal Ahmad Zeeshan 184
2 /\jmot 176
3 Sergey Alexandrovich Kryukov 175
4 Marcin Kozub 175
0 OriginalGriff 8,344
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,634
3 Maciej Los 5,024
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2014
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