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.