Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
Answer[Message Deleted] Pin
rick05565-Aug-09 5:25
rick05565-Aug-09 5:25 
AnswerRe: Creating application settings at runtime? Pin
rick05565-Aug-09 5:26
rick05565-Aug-09 5:26 
GeneralRe: Creating application settings at runtime? Pin
Sokka935-Aug-09 5:48
Sokka935-Aug-09 5:48 
QuestionHindi fonts are not shown in Exported PDF Pin
tauras813-Apr-09 20:52
tauras813-Apr-09 20:52 
QuestionPassing multiple parameters to query which counts number of rows in C# Pin
Deepali Khalkar3-Apr-09 19:23
Deepali Khalkar3-Apr-09 19:23 
AnswerRe: Passing multiple parameters to query which counts number of rows in C# Pin
Eddy Vluggen3-Apr-09 23:28
professionalEddy Vluggen3-Apr-09 23:28 
QuestionGetting the installation location in a post install task [modified] Pin
shaf2113-Apr-09 18:45
shaf2113-Apr-09 18:45 
AnswerRe: Getting the installation location in a post install task Pin
shaf2113-Apr-09 21:04
shaf2113-Apr-09 21:04 
I have found my solution after much searching. For anyone else in the same situation, here's what I did.

In the properties of the custom action that is created, there are two properties, "Arguments" and "CustomActionData". If your custom action is an exe or dll, use the Arguments property and write the value as
"[TARGETDIR]

That double quote(") at the start is required so that you can get the full location in a single string instead of the back spaces being treated as separators and get the location split across the array.

Now you can simply get the installation location through the argument array on your program.

Point to note: if you create a windows form project, the Main method does not contain the argument array as parameter. You need to add it yourself as
static void Main(string[] args)
and then you can get the location as args[0].

In case your project is another installer class, then you need to pass the data through the CustomActionData property. There are a lot of resources out there if you are using an installer class on how to provide value, what should be the format for the CustomActionData and so on. Here's an walkthrough in MSDN:
http://msdn.microsoft.com/en-us/library/9cdb5eda(VS.71).aspx[^]
Questionsql query Pin
Mangesh Tomar3-Apr-09 18:39
Mangesh Tomar3-Apr-09 18:39 
AnswerRe: sql query Pin
Christian Graus3-Apr-09 23:15
protectorChristian Graus3-Apr-09 23:15 
QuestionRichTextBox help [modified] Pin
murktinez3-Apr-09 18:32
murktinez3-Apr-09 18:32 
AnswerRe: RichTextBox help Pin
Luc Pattyn3-Apr-09 18:34
sitebuilderLuc Pattyn3-Apr-09 18:34 
GeneralRe: RichTextBox help Pin
murktinez3-Apr-09 18:40
murktinez3-Apr-09 18:40 
GeneralRe: RichTextBox help Pin
Eddy Vluggen3-Apr-09 23:37
professionalEddy Vluggen3-Apr-09 23:37 
QuestionString Format ! Pin
Mohammad Dayyan3-Apr-09 12:03
Mohammad Dayyan3-Apr-09 12:03 
AnswerRe: String Format ! Pin
Yusuf3-Apr-09 12:59
Yusuf3-Apr-09 12:59 
GeneralRe: String Format ! Pin
Mohammad Dayyan3-Apr-09 23:25
Mohammad Dayyan3-Apr-09 23:25 
GeneralRe: String Format ! Pin
Yusuf4-Apr-09 2:02
Yusuf4-Apr-09 2:02 
QuestionMSFlexiGrid in C# problem Pin
blackhattrick3-Apr-09 9:54
blackhattrick3-Apr-09 9:54 
AnswerRe: MSFlexiGrid in C# problem Pin
Christian Graus3-Apr-09 13:49
protectorChristian Graus3-Apr-09 13:49 
AnswerRe: MSFlexiGrid in C# problem Pin
Anubhava Dimri3-Apr-09 19:17
Anubhava Dimri3-Apr-09 19:17 
QuestionHow does one regenerate a form? Pin
Lecutus13-Apr-09 8:47
Lecutus13-Apr-09 8:47 
AnswerRe: How does one regenerate a form? Pin
Eddy Vluggen3-Apr-09 9:21
professionalEddy Vluggen3-Apr-09 9:21 
AnswerRe: How does one regenerate a form? Pin
Dan Neely3-Apr-09 9:47
Dan Neely3-Apr-09 9:47 
QuestionurlIdentityPermission vs SiteIdentityPermission Pin
bolly-813-Apr-09 7:52
bolly-813-Apr-09 7:52 

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.