C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Tips » Windows »

To get .MSI path, From where we are installing


Posted Date: 25 Jun 2009    Resource Type: Tips    Category: Windows
Author: Narendra Reddy vajralaMember Level: Diamond    
Rating: 1 out of 5Points: 3



After successfull build of our setup project we will get installation package.
sometimes we need the path from where client installing our project
for that
1.Select your Project Right Click
--> add new Item --> select Installer --> ok
2. RightClick on your Setup Project
--> view --> Custom Actions
3. Right Click on Install
--> Add Custom Action
-->Select Primary Output of your Project
--> ok, you can rename it.
4. Right Click on this custom action and goto Properties
--> there set CustomActionData property to /SrcDir="[SourceDir]\"
so that you will be able to get this in Installer page
5. Open Installer page
keep the following code

public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
string path = this.Context.Parameters["SrcDir"].ToString();
//now path will contain the path from where we are installing.
}



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
To get .MSI path  .  From where we are installing the application?  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Open many Gtalk on a single PC
Previous Resource: Folder lock using command prompt
Return to Discussion Resource Index
Post New Resource
Category: Windows


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use