Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6221525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:08:56+00:00 2026-05-24T08:08:56+00:00

I want to launch an EXE after completing the installation, so I wrote a

  • 0

I want to launch an EXE after completing the installation, so I wrote a custom launch condition like below:

    [RunInstaller(true)]
        public class InstallerClass : System.Configuration.Install.Installer
        {    
            public InstallerClass() : base()
            {            
                this.AfterInstall += new InstallEventHandler(InstallerClass_AfterInstall);
            }        
            void InstallerClass_AfterInstall(object sender, InstallEventArgs e)
            {
                Directory.SetCurrentDirectory(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
                ProcessStartInfo psi = new ProcessStartInfo(
                Path.GetDirectoryName(
                Assembly.GetExecutingAssembly().Location) + "\\MyApp.exe");

                psi.WorkingDirectory = Path.GetDirectoryName(
                Assembly.GetExecutingAssembly().Location);
                psi.Verb = "runas";

                Process p = new Process();
                p.StartInfo = psi;

                p.Start();            
            }        
.
.
.        }

Issue: MyApp.exe is creating http request to get some data from server. I get Timeout exception every time if MyApp.exe get Launch from here. If I run MyApp.exe separately, it successfully creates http request without timeout. Below is the code for http request:

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
request.Timeout = TimeOut;                    
request.Credentials = CredentialCache.DefaultCredentials;
request.Proxy = WebRequest.DefaultWebProxy;
request.UseDefaultCredentials = true;
request.AllowAutoRedirect = true;
request.KeepAlive = false;
request.Method = "HEAD";
request.SendChunked = true;                    

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
returnValue = response.StatusCode;
}

Why am I getting timeout exception? Where am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:08:58+00:00Added an answer on May 24, 2026 at 8:08 am

    When an installer runs it runs with special permissions/rights…

    Perhaps you could log what the values of request.Credentials = CredentialCache.DefaultCredentials; and request.Proxy = WebRequest.DefaultWebProxy; are when running successfully versus the timeout case

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I want to do is launch an *.exe file when I click
I want to launch my service with a voice command like the name of
I've a problem in my project. I would like to launch a process, 7z.exe
I want to launch a local exe-file (without saving it to another location first)
My end result is that I want to launch another setup project after the
I want to launch the dialer with custom nuber but without the call (the
I want to launch a file(a document) from a Java program and phase the
I want to launch an app on OSX from a script. I need to
I want to launch my app in landscape mode and I am following the
I have a ClickOnce deployed application I want to launch from VBScript, similar to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.