Exe created in VS2012 usng InstallShield not working

-1


I have done this like 100 times but this time its not working. I built setup using InstallShield Limited Edition Project , I installed that msi on my PC it worked fine.But when I install it on client PC it makes a shortcut icon , when I click to open it seems its trying to open but it doesnt. I disabled anti-virus , firewall as well but no use. Also this is a new PC where I am trying to create a new WINFORM. So installed flexera installSheild.

I Looked into EventViewer for logs as per @rabban. It gave error on .NET Runtime and logs says :

Application: Banquet.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at Banquet.CustDetails.InitializeComponent()
at Banquet.CustDetails..ctor()
at Banquet.Program.Main()

And theres another one Error source: Appication error and log :

Faulting application name: Banquet.exe, version: 1.0.0.0, time stamp: 0x5846b76f
Faulting module name: KERNELBASE.dll, version: 6.2.9200.17366, time stamp: 0x554d16f6
Exception code: 0xe0434352 
Fault offset: 0x00010192
Faulting process id: 0x10a8
Faulting application start time: 0x01d25048c6a7898f
Faulting application path: C:\Program Files (x86)\KAEM\My Product Name\Banquet.exe
Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
Report Id: 048f9002-bc3c-11e6-be95-10604b723b92
Faulting package full name: 
Faulting package-relative application ID: 
c#
visual-studio-2012
installshield
asked on Stack Overflow Dec 6, 2016 by mark • edited Dec 7, 2016 by mark

1 Answer

0

It seems that you tried to access something that isn't there. Put a try/catch in your program.cs around the initialising of your form and write the exception with all inner exceptions and stacktraces in a text file, then you know what is missing.

static class Program
{
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
        try
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
        catch (Exception exception)
        {
            // the file will be written in your execution path.
            string path = "error.txt";

            // if you don't have the rights to write in the execution path, uncomment this line and comment the other path line.
            // the file will then be located at: C:\Users\YourUserName\AppData\Local\error.txt
            //string path = $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\error.txt";
            if (File.Exists(path))
                File.Delete(path);

            var sb = new StringBuilder();
            while (exception != null)
            {
                sb.AppendLine(exception.ToString());
                sb.AppendLine(exception.Message);
                sb.AppendLine();

                exception = exception.InnerException;
            }

            File.WriteAllText(path, sb.ToString());

            throw;
        }
    }
}
answered on Stack Overflow Dec 7, 2016 by Rabban

User contributions licensed under CC BY-SA 3.0