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.