Why does .exe work manually but not via script ? (CLR20r3 event id) RRS feed

  • Question

  • Hi there,

    I've got a strange  error with .exe build with .Net Framework.

    A colleague (at the moment on holidays) write and build some .exe.

    When I launch them manually, it works perfectly but when I want to launch them via a script (I tried with PowerShell and Perl scripts) it doesn't work.

    I tried with the Schedule Tasks and it was the same result.


    I've got the following error (translated from French) :

    <Exe_Name> has stop working

    Error details :
    Event Type: CLR20r3
    P1: program.exe
    P3: 4d8b6868
    P4: mscorlib
    P6: 4bebe8e2
    P7: 349e
    P8: 1f7
    P9: System.UnauthorizedAccess
    System version : 6.1.7600.


    Moreover, on the server Microsoft .NET Framework 4 Client Profile and Microsoft .NET Framework 4 Extended are setup.

    I read some articles about this error code but I don't find the solution because nobody had the same problem.

    Does the exe need to be launch with options or arguments ?

    Nobody know how to fix the problem ?


    Thanks in advance.



    Fabien Moreau



    Thursday, March 31, 2011 1:14 PM


  • I find the solution: instead using Invoke-Item I use the Invoke-Expression cmdlet.

    It works with :


    cd 'C:\Programs_Folder';
    Invoke-Expression 'C:\Programs_Folder\.\Program.exe';



    Thanks for your help :)

    • Marked as answer by Chuck Norris_ Friday, April 8, 2011 2:13 PM
    Friday, April 8, 2011 2:12 PM

All replies