Msiexec cannot open this installation package

Source: Internet
Author: User
Tags vc runtime

When writing an application Host Program (supporting automatic deployment and automatic upgrade), you need to install the VC runtime and Python environment during the installation process. Therefore, you want to call "\" C: /Windows/system32/msiexec.exe \ "/I E:/software/python-3.3.0.msi "". "The installation package cannot be opened. Make sure the package exists and you have the right to access it, or contact the application vendor to confirm that it is a valid Windows installer package .", After two days of testing, I finally found out the following rules. The Calling process is as follows:

Char szcommandline [max_path] = "\" C:/Windows/system32/msiexec.exe \ "/I E:/software/python-3.3.0.msi ";
Startupinfo Si;
Zeromemory (& Si, sizeof (SI ));
Si. cb = sizeof (SI );
Process_information PI;
If (CreateProcess (null, szcommandline, null, null, false, 0, null, null, & Si, & PI ))
{
Closehandle (PI. hprocess );
Closehandle (PI. hthread );
}
1. Char szcommandline [max_path] = "\" C:/Windows/system32/msiexec.exe \ "/I E:/software/python-3.3.0.msi": Error

2. Char szcommandline [max_path] = "\" C:/Windows/system32/msiexec.exe \ "/I E: \ Software/python-3.3.0.msi": Correct

3. Char szcommandline [max_path] = "\" C:/Windows/system32/msiexec.exe \ "/I E: \ Software \ python-3.3.0.msi": Correct

4. Char szcommandline [max_path] = "\" C:/Windows/system32 \ msiexec.exe \ "/I E: \ Software \ python-3.3.0.msi": Correct

5. Char szcommandline [max_path] = "\" C:/Windows \ system32 \ msiexec.exe \ "/I E: \ Software \ python-3.3.0.msi": Correct

6. Char szcommandline [max_path] = "\" C: \ WINDOWS \ system32 \ msiexec.exe \ "/I E: \ Software \ python-3.3.0.msi": Correct

Conclusion:

For "msiexec", when parsing the installation package directory, the directory separator after the driver symbol must be '\' rather '/'. I once again confirmed my original feeling: Microsoft, my heart will never hurt
-Errors and good views, guidance, and no guidance on luck, sometimes as a wizard, and sometimes misleading.


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.