views:

900

answers:

6

I have made an application, which keeps getting updated frequently. So every time a change occurs, i've to include it's fresh builds to the setup and deployment program again and again. Is there any way to simplify the procedure? The files to be added are static in number and exist in a folder. I've heard we can write installer classes in c#, does my requirement has any thing to do with it?

I think ClickOnce doesn't suit my requirement because, for the first time i want it to run like a setup package, since it has some packages and some settings needed to be implemented on the user's machine at the time of install. Can click once help me with that? Also i want to run my application as an administrator and it references to many external dll files. So will it help my purpose?

I finally did it using clickonce deployment. I used content files to mark all the files i wanted to copy to the target computer and used clickonce deployment. Then i modified the way my program starts, so that i can lauch the installer script i wanted to run only when the app runs for the first time. Further i hosted it on IIS and had to change lot of MIME types and add new ones for the download to work over internet

+5  A: 

Look into something called "ClickOnce" deployment. It automates a lot of what you're talking about.

EDIT: You can add custom installer actions to a ClickOnce project just like any other, to set up additional components and whatnot. As for permissions, ClickOnce will let you run as administrator if you so choose, but that sort of thing isn't recommended, and it might whine about it.

GWLlosa
hi..i've updated my query, can you please have a look again..thanks
Anirudh Goel
A: 

I would flag the files as Content in their respective properties and then in the deployment project right click the project, go to File System and then right click the folder, click Add and select Content Files from the dialog box. This should copy the newest files over every time you build the deployment project.

b_richardson
+1  A: 

You can add a Setup project in your solution inside Visual Studio and then add your other project(s) outputs, or static files to the Setup project as references. The Setup project will then detect your dependencies automatically and each time you do a Rebuild All (or you rebuild/build your Setup project) it will automatically include all the necessary files.

Petros
I think the Setup and Deployment project does not exist in Express Edition. Am I right?
Peter Lee
I am not sure. Maybe. I didn't realize the question was for the Express Edition. My mistake.
Petros
+1  A: 

What type of project is it? In many cases, ClickOnce can do the job for you, at nominal effort.

Beyond that - you can usually hook your installer build into your build process; some tools will do this for you.

Installer classes run at the client - so I don't think they relate to your build process...

Marc Gravell
hi..i've updated my query, can you please have a look again..thanks
Anirudh Goel
+3  A: 

You can use ClickOnce (http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx) which simplify the deployment process. Maybe you can also automate the build process using NANT (http://nant.sourceforge.net/).

HTH

ema
It would be good if you provide a Nant script for accomplishing the task that Anirudh is asking for
Jhonny D. Cano -Leftware-
hi..i've updated my query, can you please have a look again..thanks
Anirudh Goel
+2  A: 

Hi Anirudh,

Yes, you can do that. I assume you want the client to update itself when ever there is a new version.

This needs a few changes in the client code. Essentially how it works is check for availablilty of new version at a predefined location. Update you new versions to this location. On the client side, show a message to the user if he/she wants to upgrade to the new version.

You can find a link to sample project out here and here.

rAm
i liked what you said. Am going to try it!
Anirudh Goel