我正在尝试手动设置安装路径,使用这些代码行,
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);但是,我得到了一个错误,它显示为ERROR_DIRECTORY。
如何使用此方法更改安装路径?
发布于 2015-06-16 12:31:58
在CostFinalize操作之后在自定义操作中调用MsiSetTargetPath解决了我的问题。
https://stackoverflow.com/questions/30774064
复制相似问题