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

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
General'Not enough storage is available to complete this operation.memberwaquasalig7 Nov '08 - 2:39 
Hi
I am trying to build another package.
when i am adding .mpg file of 1.3gb in application folder. during compile time getting error
'Not enough storage is available to complete this operation..
 
one more thing
as you told me make folder and set default path for specific folder location on client machine.
thing is little change now.
in my 2nd package some folder created using custom folder and adding some file there.
I hv specified the defaultlocation for this folder content as you told
actually client machine folder path is depend on my first package installation
i hv puted hard code default location in 2nd package installer.
 
suppose during 1st package instaalation client installes it in d:\ using browse then
my 2nd installer can not copy the content of folder in d:folderspecified because hard code default location.
how i will set dynamic path location in 2nd package folder that match with 1st package installation location.
so what to do ??/
 
thanx
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 
Hi
thanx for your help.
I have resolved my second issue but still waiting to resolve 1st isuue that is
error Could not find file 'D:\master.mpg' 'Not enough storage is available to complete this operation..
I have more than 5 gb space in all drive..
 
Is there any other way to solve this.
 
thanx
GeneralRe: 'Not enough storage is available to complete this operation.memberPatel Vinay8 Nov '08 - 11:38 
try to add the video files again !!
 
it seems the path for video file is missing in disk
 
check the video file you added still exist on system
 
or explain me where you added the video files ?
 
waiting for reply !!
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig9 Nov '08 - 18:08 
Hi
I have tried it again but getting same error.
My video file(1.3 gb) is in D drive .In my setup and deployment project
I have created custem folder name MPEG.After right click on this folder and selecting file option from pulldown menu. I am selecting master.mpg' from D drive and building it. I am getting same error but when i am adding video file (uptp 400 MB) it is working.
 
thanx
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig10 Nov '08 - 3:24 
Hi,
I hv spended whole day to solve this issue but still getting same error.
I got some link where same problem.
http://social.msdn.microsoft.com/forums/en-US/msbuild/thread/059d2947-fea2-492f-a734-1b4c774408ce/
 
I hv done following step
Backup the boot.ini file. Then, put the /3GB switch in your boot.ini For more information on the /3GB option, please check the following article: Memory Support and Windows Operating Systems: http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx
Make DEVENV large address aware.
Open up a VS 2005 command prompt
Change directory to the Microsoft Visual Studio 8\Common7\IDE directory.
Backup devenv.exe file.
Type and execute the following command line: "editbin /LARGEADDRESSAWARE devenv.exe"
Reboot Windows and Build.
 
but still getting same error.
 
2nd option
can it be possible not to include this file and only giving its path in set up. It pic this file and copy it in another gvn location.
 
thanx
GeneralRe: 'Not enough storage is available to complete this operation.memberwaquasalig11 Nov '08 - 1:49 
Hi
Now i am doing it with another way.
I am creating exe file that will copy the content of folder on specified location but i want that this exe file will run using package but not exe file is part of package.
is it possible to do ?
if setup will call exe file automatic during installation then my work wiil be complete.
 
waiting for reply
thanx
AnswerRe: 'Not enough storage is available to complete this operation.memberPatel Vinay14 Nov '08 - 8:03 
hi
 
you can create vbscript and add it to custom action in install or in commit
 
to copy the file the script will carry out your task !!

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

Permalink | Advertise | Privacy | Mobile
Web04 | 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