Click here to Skip to main content
12,632,326 members (30,776 online)
Click here to Skip to main content
Add your own
alternative version

Stats

93.2K views
14 bookmarked
Posted

How to add prerequisites in visual studio .net 2005 setup

, 7 Apr 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
It is explanation about how to add prerequisite for .net setup like .net framework , crystal report component and many more

Introduction

Before A few days I got a solution how to build customize setup in visual studio.net 2005 and 2003 that I am posting here for all my friends.

<o:p>

Adding Setup project to main project

Every one is knowing that when we create project or application in .net finally in deployment there are certain dependences that needs to be added in setup of that project or application

Now all knows how to add new setup project let me explain that also

Select File > Add > New Project

Then you will get one selection dialog box from that select

<o:p />other project type > Setup and deployment > Setup Project or Web setup project

<o:p />as per your application of project

<o:p />now this newly added project will be added in your solution explorer tree select that

<o:p />Setup project right click on it and add project out put and all necessary merge modules as

<o:p />you have used in your project

<o:p />now main thing adding perquisites to deployment

<o:p />Right click on your setup project select properties

<o:p />You will get following fig1

<o:p> Screenshot - fig1.jpg

Select Prerequisites as shown in fig and you will ger second fig as shown below

Screenshot - fig2.jpg

Select prerequisite that you need to Select all then and one more thing

<o:p>

Select second option button that

"Download prerequisite from same location as my application "<o:p />

<o:p>This will add all prerequisites with your setup and notice that bydefault setting is

<o:p>download from specified location so dont forget to change it

<o:p>


License

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

Share

About the Author

Patel Vinay
Web Developer
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
General'Not enough storage is available to complete this operation. Pin
waquasalig7-Nov-08 3:39
memberwaquasalig7-Nov-08 3:39 
AnswerRe: 'Not enough storage is available to complete this operation. Pin
Patel Vinay7-Nov-08 9:04
memberPatel Vinay7-Nov-08 9:04 
Hi

for 'Not enough storage is available to complete this operation..'

i can just suggest check your disk space

and make sure you have sufficient room to compile the project



for retrieving last package installation you need to create the registry in first package to write the installation path

you has to use [TARGETDIR] to set the value in registry key


and to retrieve that in second package do following

1.

Retrieve a Value from the Registry

The MediaPath value for your computer is located under the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
You can retrieve this value by using a launch condition. To do this, follow these steps:

1. In Visual Studio .NET, point to Editor on the View menu, and then click Launch Conditions.
2. In the Launch Conditions Editor, click Search Target Machine.
3. On the Action menu, click Add Registry Search.

By default, Search for RegistryEntry1 is added.
4. On the View menu, click Properties Window to select the Properties window for the registry search that you created in step 3.
5. Change the Name property value to Search for MediaPath.
6. Change the Property property value to MEDIA_PATH*.

When you run the setup project, the MediaPath registry value is retrieved to your MEDIA_PATH property.
7. To search HKEY_LOCAL_MACHINE in the registry, click the Root property, and then click vsdrrHKLM in the drop-down list box for the property value.
8. To search the SOFTWARE\Microsoft\Windows\CurrentVersion subkey, type SOFTWARE\Microsoft\Windows\CurrentVersion in the RegKey property value text box.
9. To search for the MediaPath value, type MediaPath in the Value property value text box.





Use the Retrieved Value to Change Your Installation Path

To change your installation path based on the value of your MediaPath property, change the value of the DefaultLocation property for your application folder. To do this, follow these steps:
1. Switch to the File System Editor.
2. Under File System on Target Machine, click Application Folder.
3. On the View menu, click Properties Window to select the Properties window for Application Folder.
4. To change your installation path based on the value of your MediaPath property, change the DefaultLocation property value to [MEDIA_PATH]\MyApp.


now its upto you how you want to identify your key .. as mediapath or something else what ever you need you can identify that in that way

but make sure to change accordingly

* here MEDIA_PATH is name of launch condition
and we are going to use that as default location in application folder as mention above

* make sure that MEDIA_PATH is name while mediapath is key of registry
GeneralRe: 'Not enough storage is available to complete this operation. Pin
waquasalig8-Nov-08 1:13
memberwaquasalig8-Nov-08 1:13 
GeneralRe: 'Not enough storage is available to complete this operation. Pin
Patel Vinay8-Nov-08 12:38
memberPatel Vinay8-Nov-08 12:38 
GeneralRe: 'Not enough storage is available to complete this operation. Pin
waquasalig9-Nov-08 19:08
memberwaquasalig9-Nov-08 19:08 
GeneralRe: 'Not enough storage is available to complete this operation. Pin
waquasalig10-Nov-08 4:24
memberwaquasalig10-Nov-08 4:24 
GeneralRe: 'Not enough storage is available to complete this operation. Pin
waquasalig11-Nov-08 2:49
memberwaquasalig11-Nov-08 2:49 
AnswerRe: 'Not enough storage is available to complete this operation. Pin
Patel Vinay14-Nov-08 9:03
memberPatel Vinay14-Nov-08 9:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161208.2 | Last Updated 7 Apr 2007
Article Copyright 2007 by Patel Vinay
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid