Solved

how to add custom task or actions to a setup project in vb.net

Posted on 2014-12-10
2
220 Views
Last Modified: 2014-12-11
In my projects in vb I usually add to the solution the standard setup project from visual studio

but I dont know how to call this code from the setup process:
        Dim extension As String = ".test"
        Dim name As String = "testFile1"
        Dim description As String = "test Formats File"
        Dim applicationPath As String = "Mypath\myprogram.exe"
        Dim iconPath As String = Path.Combine("Mypath\", "myicon.ico")
        AssociateFile(extension, name, description, iconPath, applicationPath)

Open in new window


I would like to know how to call the previous code when the setup process it is in progress (installation of my project).

Best regards
0
Comment
Question by:altariamx2003
  • 2
2 Comments
 
LVL 11

Accepted Solution

by:
LordWabbit earned 500 total points
ID: 40493320
It's pretty straight forward, just follow the directions on the following link.
http://msdn.microsoft.com/en-us/library/d9k65z2d%28v=vs.80%29.aspx
0
 
LVL 11

Expert Comment

by:LordWabbit
ID: 40493323
Just to add something more, I thought step 5 of the section "To add the custom action" was a bit daft and skipped it.  Don't.  Otherwise when it gets to the commit it can't find the custom action it would have installed if I hadn't skipped step 5.

In the Custom Actions Editor, select the Install node and add Primary output from OpenWeb to this node as you did for the Commit node.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question