Share via

Error 0xc0000142 on Windows 10

Anonymous
2019-06-24T21:10:29+00:00

I am tech support in a corporate environment with hundreds of machines.

I have a batch file which contains this line: 

cmd.exe /C start C:\Progra~2\Micros~2\Office15\EXCEL.exe 

which launches 32 bit MS Excel on my Windows 7 machine.

Now, I need to do the same thing with 64 bit Excel on my Windows 10 laptop, so naturally I go with 

cmd.exe /C start C:\Progra~1\Micros~2\root\Office16\EXCEL.exe

which instantly gets me the message:

"Application Error. The application was unable to start correctly (0xc0000142). Click OK to close the application."

After some investigation,  I discover that I cannot use the ~ path notation. Instead I must use the full length path name, and enclose it in quotes. Because the 'start' command interprets the first string parameter as a title for the window, I have to include a dummy string in quotes immediately after the 'start' command so that interprets the second string parameter as the path to the Excel executable, and the program to be executed. Also, each double quote must be escaped with a caret ^. So, I end up with this:

cmd.exe /C start ^"^" ^"C:\Program Files\Microsoft Office\root\Office16\EXCEL.exe^" 

Although this is an adequate workaround, why can I not just use the short ~ notation pathnames, and keep the script tidy?

Notes:

  1. This happens on multiple machines, every machine tested in fact.
  2. This also occurs if I simply enter the path to the executable at a command line prompt. So, at a command prompt,

"C:\Program Files\Microsoft Office\Root\Office16\Excel.exe" - will work perfectly, but

C:\Progra~1\Micros~2\Root\Office16\Excel.exe - will fail with the same error.

  1. This behaviour is repeated with every executable on every path I have tried. 
  2. The error box is headed with the name of the .exe, so it IS finding the executable on the path, it just won't launch it.
  3. If I type the ~ notation path in to the address bar it navigates to the folder without difficulty.

So, it is nothing to do with:

  • being in a batch file
  • the syntax of 'start'
  • any particular executable
  • the validity of the path.

It just seems that, at least when launching an application, ~ notation pathnames do not work with our Windows 10 image by default.

Is there something we need to change so that they will?

While I am grateful to anyone who takes time with this, I would respectfully ask that you only reply if you _know the answer_, and not with generic troubleshooting routines, because unless you have something truly new, I likely went through it along the path to the workaround I already have (check the path, repair MS Office, run updates, try another machine etc etc).

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2019-06-24T21:25:22+00:00

    As I said in my post, I have already tried this.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-06-25T13:35:12+00:00

    I have been through all these steps to no effect.

    Although I appreciate your attention, as I said in my first post, I am not looking for generic troubleshooting answers, but for answers from someone who has specific experience or knowledge of this issue and knows either how to fix it, or why it cannot be fixed.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-06-24T21:29:46+00:00

    I recommend using SFC

    Press the Start key and type the word CMD, right click on the command prompt and select Run as administrator, enter the following commands one by one followed by the Enter key:

    •- DISM.exe /Online /Cleanup-image /Scanhealth

    •- DISM.exe /Online /Cleanup-image /Restorehealth

    •- DISM.exe /online /cleanup-image /startcomponentcleanup

    •- sfc /scannow

    https://answers.microsoft.com/en-us/windows/for...

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-06-24T21:18:33+00:00

    Hi, MarkDear

    My name is Kathleen and I am an Independent Advisor. I would be happy to help you today.

    Try to repair Office.

    https://support.microsoft.com/en-us/help/276934...

    https://support.office.com/en-us/article/repair...

    Let us know if these steps help you to resolve the issue.

    Was this answer helpful?

    0 comments No comments