TCC waits for Office apps

May 20, 2008
Syracuse, NY, USA
... more TCC problems related to the store version of Office 2019.

I have "ExecWait=No". TCC waits after executing, for example, "excel" ... "winword".

Apparently TCC can't figure out if it's CUI or GUI.

v:\> which /a excel
excel is an external : C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\excel.EXE
excel is an external : C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Excel_16051.12228.20364.0_x86__8wekyb3d8bbwe\Office16\EXCEL.exe

v:\> echo %@exetype["c:\program files\windowsapps\\office16

v:\> echo %@exetype[C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\excel.EXE]

v:\> echo %@errtext[1920]
The file cannot be accessed by the system.
Not reproducible here (either the wait or failing to identify the type).

You need to figure out why your system is blocking TCC's access to the executable; that's probably the root cause of all your troubles.
CMD and PowerShell don't wait for Excel. With a handful of lines of code, I can determine if an EXE file (including Office files) is a GUI or CUI app. When I hear that others with the store version of Office 2019 are not having these problems, I'll consider it MY problem.
This problem persists. FWIW, this works in a plugin to determine that my Excel is a GUI app.

DWORD FileIsGuiApp(LPCWSTR szAppFile) // returns 1 (GUI), 0 (CUI), or last error
    DWORD_PTR pdw = SHGetFileInfoW(szAppFile, 0, &fi, sizeof(SHFILEINFOW), SHGFI_EXETYPE);
    DWORD dwLE = GetLastError();
    if ( dwLE != 0 )
        return dwLE;
    return (HIWORD(pdw) != 0) ? 1UL : 0UL;

Here's the result of a test of it.

1920 - TCC: (Sys) The file cannot be accessed by the system.

"c:\program files\windowsapps\\office16\excel.exe"
1 - GUI

0 - CUI

Similar threads