Workaround for the. NET installation Deployment "Error 1001 exception occurred during initialization of installation"

Source: Internet
Author: User

Condition Description:
After packaging the installation, if you delete a file from the installation directory, starting the software system from the desktop shortcut will automatically run the fix, because the path issue will report "error 1001 exception XXX during initialization of installation". (As long as you have added a "custom action" to your installation deployment and sent it a value).

The reason for the lookup was that the CustomActionData value was wrong in the custom action. The CustomActionData before the error.

/dbname=[dbname]/servername=[servername]/user=[user]/password=[password]/setuptype=[setuptype]

Workaround:

Add single quotes next to two double quotation marks, respectively.
You need to change the CustomActionData value method from the previous/key= "[value]\" to/key= "' [value]\ '".
Example:/sourcedir= "' [sourcedir]\ '" "/installdir=" ' [targetdir]\ ' "/installname=" Monitor "

This way, the parameters obtained in the installation class will have two more ", such as ' c:\a\b ', which need to be handled manually. This solves the problem.

If you uninstall the installation package error: "An exception occurred during initialization of the installation and cannot find the * * file", it is possible that the installer code location is incorrect.

Such as:

String Settxtpath = SetupSourcePath + "Set.txt";

DataList = Getsetconfig (Settxtpath);//Read the configuration file for the installation package

Base. Install (statesaver);

Because the hotfixes are automatically run during installation and uninstallation, it is in base. The code before Install (statesaver) is executed, so uninstallation causes an error: "Set.txt not Found".

Modified to:

String Settxtpath = SetupSourcePath + "Set.txt";
Base. Install (statesaver);

DataList = Getsetconfig (Settxtpath);//Read the configuration file for the installation package

You can do it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.