If I hardcode that path then it is working fine.But I have to convert the long path of INSTALLDIR to shortpath.Using MsigetProperty i'm getting the INSTALLDIR value and passing it to the LongPathToShortpath function.But the function fails.Help me to solve this problem.
The code which i have used is which is not working is
f
unction Longtoshort(hMSI)
STRING szDir,szBuffer,svPath,szMsg;
NUMBER nBuffer,nResult;
begin
nBuffer=256;
MsiGetProperty(hMSI,"INSTALLDIR",szDir,nBuffer);
nResult=LongPathToShortPath(szDir);
end;
But if i give it as
szDir="C:\\Program Files\\";
LongPathToShortPath(szDir);
It is working Fine.
Please Help...