This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Error 1001. Installer Was Not Working
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 16, 2017
03:51 AM
Error 1001. Installer Was Not Working
I created Visual Studio 2013(Professional) Windows Application with .Net 4.5 frame work. In This solution I added new class file Installer class file.
Sample Code:
namespace WindowsFormsApplication1
{
[RunInstaller(true)]
public class AddinInstaller : Installer
{
#region Base Implementation
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
public AddinInstaller()
{
InitializeComponent();
}
public override void Install(IDictionary stateSaver)
{
try
{
base.Install(stateSaver);
Debugger.Launch();
Assembly Asm = Assembly.GetExecutingAssembly();
FileInfo asmFile = new FileInfo(Asm.Location);
}
catch (InstallException ex)
{
throw new InstallException(ex.Message);
}
catch
{
throw new InstallException("Error installing addin!");
}
}
public override void Uninstall(IDictionary savedState)
{
try
{
}
catch
{
}
base.Uninstall(savedState);
}
}
}
Now I created new Install Shiled Project with 2015LE with .Net 4.5 frame wok.
I checked the Installer Class checkbox on the COM & .NET Settings tab on the Properties window of the Primary Output file.
Once done build and I am installing this setup. I got This error "1001".
Please provide solution for this one.
Thank you
Sample Code:
namespace WindowsFormsApplication1
{
[RunInstaller(true)]
public class AddinInstaller : Installer
{
#region Base Implementation
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
public AddinInstaller()
{
InitializeComponent();
}
public override void Install(IDictionary stateSaver)
{
try
{
base.Install(stateSaver);
Debugger.Launch();
Assembly Asm = Assembly.GetExecutingAssembly();
FileInfo asmFile = new FileInfo(Asm.Location);
}
catch (InstallException ex)
{
throw new InstallException(ex.Message);
}
catch
{
throw new InstallException("Error installing addin!");
}
}
public override void Uninstall(IDictionary savedState)
{
try
{
}
catch
{
}
base.Uninstall(savedState);
}
}
}
Now I created new Install Shiled Project with 2015LE with .Net 4.5 frame wok.
I checked the Installer Class checkbox on the COM & .NET Settings tab on the Properties window of the Primary Output file.
Once done build and I am installing this setup. I got This error "1001".
Please provide solution for this one.
Thank you
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 18, 2017
02:06 PM
As a rule of thumb, don't use installer classes. You really want to do all that configuration work in the installer, and not in .Net code--because the installer has all kinds of functionality provided for it--install, modify, rollback, etc. service registration, GAC installation, etc. In fact, once upon a time, adding a new installer class to a .Net project would include in the template code a bug which would produce -1001 errors on modify/repair. (I don't know if this is still the case, tbh)
Other reasons to avoid installer classes:
-It's hard to get to the root of a -1001 error (usually not logged in the MSI log; have to chase down the installer class log, and have the good fortune to have it logged there)
-Almost all errors show up as -1001 errors, despite having a variety of causes
-Registration is dependent on the application having everything in order at the time of registration (may not be if you have dependencies in the GAC)
My advice is to make a list of all the stuff you need to do, and one by one look up how to accomplish it in native installer functionality. It may be more work figuring it out if you're much more a .Net dev than an installer dev, but it's going to be easier to live with in the long run.
Other reasons to avoid installer classes:
-It's hard to get to the root of a -1001 error (usually not logged in the MSI log; have to chase down the installer class log, and have the good fortune to have it logged there)
-Almost all errors show up as -1001 errors, despite having a variety of causes
-Registration is dependent on the application having everything in order at the time of registration (may not be if you have dependencies in the GAC)
My advice is to make a list of all the stuff you need to do, and one by one look up how to accomplish it in native installer functionality. It may be more work figuring it out if you're much more a .Net dev than an installer dev, but it's going to be easier to live with in the long run.