I need to run a MSI-file (Microsoft Installer) from my application and I want my application to wait until the installation has been finished.
Waitrun() and Winexec() cannot be used since they don't work with a MSI-file.
So I try to use ShellExecute()
This is the code :
ShellExecute(,"Open","MSXML.MSI",,,3)
SYSWAIT(5)
DO WHILE .T.
  hFile := FOPEN("MSXML"+IF(IsWin7(),"6","4")+".MSI",FO_READWRITE + FO_EXCLUSIVE)
  IF FERROR() <> 0
   SYSREFRESH()
   SLEEP(1)
   LOOP
  ENDIF
  FCLOSE(hFile)
  EXIT
  SYSREFRESH()
ENDDOUnfortunately, my application doesn't wait until the installation has been finished.
How can I solve this problem?
Thanks you.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773