Hi friends, today I spent few moments in sorting out how to get the path of SUPPORTDIR in a basic MSI project. Although working in Installscript suits me much, its convenient also. But how it can be achieved via custom actions seems to be tedious at first glance.
But at last, finds way to the road much wider. :)
You need to declare the prototype for the below stated function.
export prototype STRING GetSupportFilePathMSI(HWND);
function STRING GetSupportFilePathMSI(hMSI)
STRING supportDirPath;
NUMBER nLength;
begin
nLength = 256;
// Returns path to the Support files path extracted on the target machine.
MsiGetProperty(hMSI, "SUPPORTDIR", supportDirPath, nLength);
return supportDirPath;
end;
The function returns the path of the SUPPORTDIR, which you needs to save in a variable.
But at last, finds way to the road much wider. :)
You need to declare the prototype for the below stated function.
export prototype STRING GetSupportFilePathMSI(HWND);
function STRING GetSupportFilePathMSI(hMSI)
STRING supportDirPath;
NUMBER nLength;
begin
nLength = 256;
// Returns path to the Support files path extracted on the target machine.
MsiGetProperty(hMSI, "SUPPORTDIR", supportDirPath, nLength);
return supportDirPath;
end;
The function returns the path of the SUPPORTDIR, which you needs to save in a variable.
No comments:
Post a Comment