Click here to Skip to main content
Click here to Skip to main content

How to add prerequisites in visual studio .net 2005 setup

By , 7 Apr 2007
 

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.

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

other project type > Setup and deployment > Setup Project or Web setup project

as per your application of project

now this newly added project will be added in your solution explorer tree select that

Setup project right click on it and add project out put and all necessary merge modules as

you have used in your project

now main thing adding perquisites to deployment

Right click on your setup project select properties

You will get following fig1

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

Select second option button that

"Download prerequisite from same location as my application "

This will add all prerequisites with your setup and notice that bydefault setting is

download from specified location so dont forget to change it


License

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

About the Author

Patel Vinay
Web Developer
India India
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1memberafaz28 Jun '11 - 18:19 
Generali didn't get the prerequesitsmember07aneesh9 May '10 - 23:38 
GeneralMy vote of 1memberUKCodeMonkey15 Jul '09 - 0:25 
QuestionHi! Can you help me with prerequisites from my website?membercre8810 Jul '09 - 4:04 
AnswerRe: Hi! Can you help me with prerequisites from my website?memberPatel Vinay10 Jul '09 - 4:37 
Questioncan u explain for framework 3.5 please?memberNarendra Reddy Vajrala29 Apr '09 - 8:59 
AnswerRe: can u explain for framework 3.5 please?memberPatel Vinay24 May '09 - 5:03 
GeneralRe: can u explain for framework 3.5 please?memberNarendra Reddy Vajrala26 May '09 - 17:30 
Generaluninstallation problemmemberwaquasalig13 Nov '08 - 5:05 
AnswerRe: uninstallation problemmemberPatel Vinay14 Nov '08 - 7:56 
General'Not enough storage is available to complete this operation.memberwaquasalig7 Nov '08 - 2:39 
AnswerRe: 'Not enough storage is available to complete this operation.memberPatel Vinay7 Nov '08 - 8: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.memberwaquasalig8 Nov '08 - 0:13 
GeneralRe: 'Not enough storage is available to complete this operation.memberPatel Vinay8 Nov '08 - 11:38 
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig9 Nov '08 - 18:08 
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig10 Nov '08 - 3:24 
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig11 Nov '08 - 1:49 
AnswerRe: 'Not enough storage is available to complete this operation.memberPatel Vinay14 Nov '08 - 8:03 
GeneralInstalling content of folder in specified locationmemberwaquasalig5 Nov '08 - 2:47 
AnswerRe: Installing content of folder in specified locationmemberPatel Vinay5 Nov '08 - 3:53 
GeneralRe: Installing content of folder in specified locationmemberwaquasalig6 Nov '08 - 0:19 
GeneralWritting installation setup on multiple DVDmemberwaquasalig23 Oct '08 - 20:39 
AnswerRe: Writting installation setup on multiple DVDmemberPatel Vinay24 Oct '08 - 9:52 
GeneralRe: Writting installation setup on multiple DVDmemberwaquasalig26 Oct '08 - 23:06 
GeneralRe: Writting installation setup on multiple DVDmemberPatel Vinay27 Oct '08 - 7:08 

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

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