TCC waits for Office apps

May 20, 2008
11,867
121
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.

Code:
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\microsoft.office.desktop.excel_16051.12228.20364.0_x86__8wekyb3d8bbwe\office16
\excel.exe"]
0

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

v:\> echo %@errtext[1920]
The file cannot be accessed by the system.
 
May 20, 2008
11,867
121
Syracuse, NY, USA
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.
 
May 20, 2008
11,867
121
Syracuse, NY, USA
This problem persists. FWIW, this works in a plugin to determine that my Excel is a GUI app.

Code:
DWORD FileIsGuiApp(LPCWSTR szAppFile) // returns 1 (GUI), 0 (CUI), or last error
{
    SHFILEINFOW fi;
    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.

Code:
"c:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\excel.exe"
1920 - TCC: (Sys) The file cannot be accessed by the system.

"c:\program files\windowsapps\microsoft.office.desktop.excel_16051.12228.20364.0_x86__8wekyb3d8bbwe\office16\excel.exe"
1 - GUI

"d:\tc26\tcc.exe"
0 - CUI
 

Similar threads