How do i create a folder in my C drive and copy the related csv files during my ClickOnce installation


  • Hi,

    I have a requirement to develop an outlook addin which captures users input and creates a csv file and places it on user's C:\imp folder.I am struggling to find out how can i create a folder on target machine and put the csv files in it by using Click Once strategy. I could do the same thing with windows installer but finding it difficult to achieve the same by ClickOnce . I need to use click once as there would be multiple automatic updates for the addin .

    I am very new to .net and to ClickOnce. Looking for your help



    Thursday, August 23, 2012 10:27 AM


  • Hi Arvind,

    Why would you need to create the csv files during installation? The user can't input anything until the add-in is actually running, right? Or am I misunderstanding what you're saying it's going to do?

    You can create a folder on the target machine using Directory.Create; it has nothing to do with whether it's ClickOnce or not. Of course, you have to create it in a location that ClickOnce can actually create a folder, which would be LocalApplicationData or MyDocuments. You might be able to create a folder on the C drive, but I'd be surprised.

    Once you create the folder, you can just write your files to it.

    I'm not sure exactly what you're asking. If you're asking how to write code to create a directory and then write CSV files to it, please post back your language of choice and I will move your thread to that forum.

    If you're deploying some csv files with your add-in and want to create a directory and copy them to it, you can't do this during installation, you have to have your add-in do it when it starts up.


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Friday, August 24, 2012 3:20 AM