Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
417 views
in Technique[技术] by (71.8m points)

installshield - Error 1001 when installing custom Windows Service

I wrote a windows service that runs on Framework 4.0 and running in VS 2015. I also created a setup project (free Installshield version).

My service did not show under services.msc after I installed it, so according to some other posts I had to mark the Primary Output in InstallShield as 'Installer Class', but when I do that I get Error 1001 when I run the setup.exe.

This post states that "Error code 1001 ALWAYS means a failure in the Installer class custom action." and that I should not use Custom Actions. I'm not using any custom actions at the moment.

Most of the solution on this site have instructions for Installshield 2010, and the steps does not work for 2015.

The error appears on both my dev machine as well as all client machines. Any suggestions?

EDIT:

The event viewer displays "Failed to create restore point (Process = C:Windowssystem32msiexec.exe /V; Description = Installed My App Name.; Error = 0x80070422).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had this exact same issue. Suddenly after upgrading to VisualStudio 2013 and the newer InstallShield LE and building my installation packages they would fail with the cryptic 1001 error.

Definitive Answer

I found the definitive answer. You can no longer have the checkbox for "installer class" selected in InstallShieldLE. You must uncheck that item.

In order to open this dialog box, go to Specify Application Data > Files and right click on your Primary Output and select Properties.

uncheck Installer Class

Previously, You Had To Have It Selected: Now It Must Not Be Selected

Previously (Visual Studio 2012 and before you had to have that item selected or the service installation would fail. This is quite terrible.

Now, you have to go to following tree item in the InstallShield LE project and double-click the Services node: services node

After that the Services item appears on the left (have I mentioned what a terrible UX and UI this entire thing is?) and right click it so you can add the service.

add service

Choose the menu item which appears to add the service and you'll get a form which allows you to set up the installer details.

installation details

Once you do that and rebuild your MSI will work and this will resolve the 1001 error.

This was all a terrible waste of time that the original InstallShield Devs could've resolved. Unfortunate.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...