I'm trying to set installation path manually, with these lines of code,
MSIHANDLE msiHandle;
UINT openPackageExitCode = MsiOpenPackage(LR"(path to .msi file)", &msiHandle);
LPCTSTR newPath = LR"(C:\test\)";
UINT changePathResult = MsiSetTargetPath(msiHandle, L"INSTALLDIR", newPath);
MsiCloseHandle(msiHandle);
but, I get an error which says ERROR_DIRECTORY
.
How can I change the installation path with this method?
调用MsiSetTargetPath
定制操作后CostFinalize
行动解决我的问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.