Click here to Skip to main content
15,920,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating the Spyware Pin
softp_vc11-Aug-04 2:57
softp_vc11-Aug-04 2:57 
GeneralRe: Creating the Spyware Pin
Nick Parker11-Aug-04 4:35
protectorNick Parker11-Aug-04 4:35 
GeneralRe: Creating the Spyware Pin
Dave Kreskowiak11-Aug-04 5:34
mveDave Kreskowiak11-Aug-04 5:34 
GeneralRe: Creating the Spyware Pin
Name Removed11-Aug-04 6:08
Name Removed11-Aug-04 6:08 
QuestionExtract outlook/exchange email attachments? Pin
Swaity10-Aug-04 22:22
Swaity10-Aug-04 22:22 
Generalopen an uploaded file Pin
tzewei10-Aug-04 21:59
tzewei10-Aug-04 21:59 
QuestionHow to launch a program at the end of an MSI installation? Pin
kmeads10-Aug-04 20:51
kmeads10-Aug-04 20:51 
AnswerRe: How to launch a program at the end of an MSI installation? Pin
LongRange.Shooter11-Aug-04 3:34
LongRange.Shooter11-Aug-04 3:34 
Okay...get ready to pull all of your hair out, run naked around the office going 'who-wha-baby, who-wha-baby' and needing a good drink tonight. You will find that there is very little documentation on the installer.

You will probably need to write a custom installer which will do the install and then do the action you want done. Fortunately you don't have to pass data to it, it gets' worse. Smile | :)
This sample does a check for winproxy then installs. You want to reverse this, do install then launch the process. BTW -- should you need it later, the exception throw in my logic is how you decide to stop an install based on your logic conditions.
Sorry, I never needed to add registry entries on my installs. We built them internally to the program as needed. Many of the variables are part of the SDK though.

/// <summary>
/// Checks for the existence of the Microsoft 2.0 Winsock Proxy Client
/// </summary>
/// <remarks>
/// Assumptions based on Win2K/NT client and
///     http://support.microsoft.com/default.aspx?scid=kb;en-us;218482&Product=prs
/// </remarks>
[RunInstaller(true)]
public class CustomAction : System.Configuration.Install.Installer
{
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null;

    public CustomAction()
    {
        // This call is required by the Designer.
        InitializeComponent();

        // TODO: Add any initialization after the InitComponent call
    }

    #region Component Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        components = new System.ComponentModel.Container();
    }
    #endregion

    /// <summary>
    /// Custom install for client
    ///   Verifies the Winsock Client is not present or at least inactive.
    ///   Installs the application.
    ///   Creates the application registry key.
    /// </summary>
    /// <param name="stateSaver"></param>
    public override void Install(System.Collections.IDictionary stateSaver)
    {


        string fn = Path.Combine(Environment.SystemDirectory,@"Wspcpl32.cpl");

        if ( File.Exists( fn ) )
        {
            StringBuilder msg = new StringBuilder();

            msg.Append("TCA Navigator Install has detected the presence of the WinSock Proxy Client.");
            msg.Append(System.Environment.NewLine);
            msg.Append(System.Environment.NewLine);
            msg.Append("It is necessary to reconfigure (via Control Panel) so that the client is not active.");
            msg.Append(System.Environment.NewLine);
            msg.Append("If you have already done so, click OK to continue with the install.");
            msg.Append(System.Environment.NewLine);
            msg.Append("Otherwise, hit Cancel, since continuing installation may make your system unstable.");
            msg.Append(System.Environment.NewLine);
            msg.Append(System.Environment.NewLine);
            msg.Append("We recommending requesting that this be removed from your RADIA install configuration.");

            if (MessageBox.Show(msg.ToString(), "Winsock Proxy Client detected",
                MessageBoxButtons.OKCancel,
                MessageBoxIcon.Stop,
                MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
            {
                throw new InstallException("Installation cancelled by user action.");
            }
        }


        base.Install(stateSaver);


This signature left intentionally blank
GeneralRe: How to launch a program at the end of an MSI installation? Pin
kmeads11-Aug-04 6:47
kmeads11-Aug-04 6:47 
GeneralRe: How to launch a program at the end of an MSI installation? Pin
LongRange.Shooter11-Aug-04 7:39
LongRange.Shooter11-Aug-04 7:39 
GeneralGetProcAddress Pin
Vadim Tabakman10-Aug-04 20:22
Vadim Tabakman10-Aug-04 20:22 
GeneralRe: GetProcAddress Pin
Heath Stewart10-Aug-04 20:46
protectorHeath Stewart10-Aug-04 20:46 
GeneralRe: GetProcAddress Pin
Vadim Tabakman10-Aug-04 20:56
Vadim Tabakman10-Aug-04 20:56 
GeneralRe: GetProcAddress Pin
leppie10-Aug-04 21:34
leppie10-Aug-04 21:34 
GeneralRe: GetProcAddress Pin
Vadim Tabakman11-Aug-04 2:26
Vadim Tabakman11-Aug-04 2:26 
GeneralRe: GetProcAddress Pin
Heath Stewart11-Aug-04 2:26
protectorHeath Stewart11-Aug-04 2:26 
GeneralRe: GetProcAddress Pin
Vadim Tabakman11-Aug-04 12:19
Vadim Tabakman11-Aug-04 12:19 
QuestionHow to Trasfer Data from MsAccess database to SQL Server Database using C# Pin
pubududilena10-Aug-04 18:35
pubududilena10-Aug-04 18:35 
AnswerRe: How to Trasfer Data from MsAccess database to SQL Server Database using C# Pin
Heath Stewart10-Aug-04 19:36
protectorHeath Stewart10-Aug-04 19:36 
GeneralWorking with text archive Pin
Flavio Serrazes10-Aug-04 16:11
Flavio Serrazes10-Aug-04 16:11 
GeneralRe: Working with text archive Pin
Dave Kreskowiak11-Aug-04 5:41
mveDave Kreskowiak11-Aug-04 5:41 
Generalchange from C++ code to C# Pin
Rulala10-Aug-04 15:55
Rulala10-Aug-04 15:55 
GeneralRe: change from C++ code to C# Pin
Christian Graus10-Aug-04 16:24
protectorChristian Graus10-Aug-04 16:24 
GeneralRe: change from C++ code to C# Pin
Rulala10-Aug-04 17:37
Rulala10-Aug-04 17:37 
GeneralRe: change from C++ code to C# Pin
Heath Stewart10-Aug-04 19:30
protectorHeath Stewart10-Aug-04 19:30 

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.