Executable causing some issues, (0xc0000142)

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

Executable causing some issues, (0xc0000142)

Post by DaveMcDonald »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2019 Version 5.6.167 build v10.0.16299.0
32 or 64 bit version of product:64
Operating system:Windows 10 Enterprise.
32 or 64 bit OS:64

*** Please add details and screenshots as needed below. ***

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Background: We needed a tool to check share information (security groups, permissions on the security groups etc). Our network has some issues with shared drives, not everyone at our Service Desk can access the information (even the same issue with the Account Management group). So, the only solution was to create a service account that did have access to all shares but no access to AD other than Domain User.

This worked for the first two versions of the application. The third version, of which I am working on, contains some new features. One of them is the ability to modify managedby and add write-members permissions to security groups. because the account the program is impersonating has no access to AD to modify security groups, I have set it up as a Job to change this information.

The start-job is running as credentials provided by the user. These credentials do have the required access to AD.

When the start-job runs, it returns the subject error.

I am thinking it's an issue with the impersonation and the start-job running as different credentials.

The error within the script is:
[localhost] The background process reported an error with the following message: .
+ CategoryInfo : OpenError: (localhost:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : 2100,PSSessionStateBroken
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Executable causing some issues, (0xc0000142)

Post by brittneyr »

[TOPIC MOVED TO WINDOWS POWERSHELL FORUM BY MODERATOR]
Brittney
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Executable causing some issues, (0xc0000142)

Post by jvierra »

You have a mistake in your coding. YOu are passing an array where a simple string is required. Please get nd read the complete error as it will tell you the exact command.
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

Re: Executable causing some issues, (0xc0000142)

Post by DaveMcDonald »

Here is the function.
  1. Function Change-SecACL
  2. {
  3.     <#
  4.         .SYNOPSIS
  5.             This function will modify a security group ACL.
  6.        
  7.         .DESCRIPTION
  8.             This function will run as a job with diffrent credeitanls (supplied at start of the script).
  9.         It will ADD or REMOVE an ACE from the ACL. It only currently adds or removes the Write-Members allow
  10.         ACE for the User.
  11.            
  12.         .EXAMPLE
  13.                     PS C:\> Change-SecACL mcdonalddw ETIAll -AR ADD
  14.    
  15.         .NOTES
  16.             Since the whole script runs as a service account, this funtion actually runs as a job with diffrent
  17.         credentials. We do not want the serivce account modifying AD objects. Admin account credentials must be
  18.         supplied at the start of the script.
  19.    
  20.         .PARAMETER $USER
  21.             An AD User Account
  22.    
  23.         .PARAMETER $Group
  24.             An AD Security Group
  25.    
  26.         .PARAMETER $AR
  27.             Add or Remove the user from the group ACL
  28.     #>
  29.     param (
  30.        
  31.         [Parameter(Mandatory = $true)]
  32.         [System.String]$User,
  33.         [Parameter(Mandatory = $true)]
  34.         [System.String]$Group,
  35.         [ValidateSet("ADD", "REMOVE")]
  36.         [System.String]$AR
  37.     )
  38.    
  39.     # Must be run as a job with diffrent crednetials
  40.     Write-Host "Starting Job"
  41.     Try
  42.     {
  43.         Start-job -InitializationScript ({ Import-Module Microsoft.PowerShell.Security }) -PSVersion 3.0 -name "Set-ACL" -Credential $admincred -ScriptBlock {
  44.             $AR = $args[2]
  45.             $userinfo = get-aduser $args[0]
  46.             $groupinfo = Get-adgroup $args[1]
  47.             #Create the SID object
  48.             $Sid = New-Object System.Security.Principal.NTAccount($userinfo.SamAccountName)
  49.             $sid = $sid.Translate([System.Security.Principal.SecurityIdentifier])
  50.             $identity = $sid
  51.             $aclpath = "AD:\$($groupinfo.DistinguishedName)"
  52.             #Get the current ACL
  53.             $GroupACL = Get-Acl -Path $aclpath
  54.             #Create the access control entry we wish to modify.
  55.             $ACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule(
  56.                 $identity,
  57.                 [System.DirectoryServices.ActiveDirectoryRights]::WriteProperty,
  58.                 [System.Security.AccessControl.AccessControlType]::Allow,
  59.                 "bf9679c0-0de6-11d0-a285-00aa003049e2",
  60.                 [DirectoryServices.ActiveDirectorySecurityInheritance]::All
  61.             )
  62.             #Decide if we are going to add the ACE to the ACL or remove the ACE from the ACL.
  63.             switch ($AR)
  64.             {
  65.                 "ADD" { $GroupACL.AddAccessRule($ACE); break }
  66.                 "REMOVE" { $GroupACL.RemoveAccessRule($ACE); break }
  67.             }
  68.             #Set the ACL with the modifications. This will preserve the original entries other than the one we modified.
  69.             Set-Acl -path $aclpath -AclObject $GroupACL
  70.            
  71.         } -ArgumentList $User, $Group, $AR
  72.     }
  73.     catch
  74.     {
  75.         if ($_.Exception.InnerException)
  76.         {
  77.             Write-Host $_.Exception.InnerException.Message
  78.         }
  79.     }
  80.     #Wait for the job to complete.
  81.     #Write-Host "Waiting for Job"
  82.     Wait-job -name "Set-Acl"
  83.     Receive-Job -Name "Set-ACL"
  84. }
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Executable causing some issues, (0xc0000142)

Post by jvierra »

The error indicates a network or system issue. Please carefully read the complete error.

It is more helpful to return the exact and complete error object. Your "Catch" should just rethrow the error and quit.

Code: Select all

Catch{
     Throw $_
}
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Executable causing some issues, (0xc0000142)

Post by jvierra »

Here is a cleaner and more correct way to write your code:

Code: Select all

Function Change-SecACL {
    Param(
        [Parameter(Mandatory = $true)]
        [string]$User,
        [Parameter(Mandatory = $true)]
        [string]$Group,
        [Boolean]$RemoveAce
    )
    
    $jobScript = {
        $ErrorActionPreference = 'Stop'
        Try{
            $AR = $args[2]
            $aduser = get-aduser $User
            $adgroup = Get-adgroup $Group
            $adpath = "AD:\$($adgroup.DistinguishedName)"
            $GroupACL = Get-Acl $adpath
            $ace = [System.DirectoryServices.ActiveDirectoryAccessRule]::New($aduser.SID,'WriteProperty','Allow','bf9679c0-0de6-11d0-a285-00aa003049e2','All')
            if($RemoveAce){
                $GroupACL.RemoveAccessRule($ace)
            }else{
                $GroupACL.AddAccessRule($ace)
            }
            Set-Acl -path $adpath -AclObject $GroupACL
        }
        Catch{
            Throw $_
        }
    }
        
    # Must be run as a job with diffrent crednetials
    Write-Host "Starting Job"
    $ErrorActionPreference = 'Stop'
    Try{
        $job = Start-job -Name SetACL -Credential $admincred -ScriptBlock $jobScript -ArgumentList $User, $Group, $RemoveAce
        $job | Receive-Job -Wait
    }
    Catch{
        Throw $_
    }
}
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

Re: Executable causing some issues, (0xc0000142)

Post by DaveMcDonald »

Thanks for that. It is much cleaner. Learning PowerShell is a continuing process. Things like Throw I didn't know.

I am still getting the same error (The application was unable to start correctly (oxcooo142)) but something else comes up as well now. The application is impersonating a different account and running the job with diffrent credentials (this is what I believe is the issue). I have attached some screen shots in word.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Management.Automation.RuntimeException: [localhost] The background process reported an error with the following message: . ---> System.Management.Automation.Remoting.PSRemotingTransportException: The background process reported an error with the following message: .
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary`2 functionsToDefine, List`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0()
at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action)
at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List`1 variablesToDefine, Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.InvokeAsDelegateHelper(Object dollarUnder, Object dollarThis, Object[] args)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
PoshExeHostWinV5
Assembly Version: 5.0.34.0
Win32 Version: 1.0.1.0
CodeBase: file:///D:/Account%20Management/Scripts/Powershell%20Stuido%20Forms/CheckACLV3/bin/x64/CheckACLV3.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Management.Automation
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.1146
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.PowerShell.Commands.Diagnostics
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Diagnostics/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Diagnostics.dll
----------------------------------------
System.Configuration.Install
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
----------------------------------------
Microsoft.PowerShell.ConsoleHost
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.431
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.ConsoleHost/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.ConsoleHost.dll
----------------------------------------
Microsoft.PowerShell.Commands.Utility
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Utility/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Utility.dll
----------------------------------------
Microsoft.PowerShell.Commands.Management
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Management/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Management.dll
----------------------------------------
Microsoft.Management.Infrastructure
Assembly Version: 1.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Management.Infrastructure/v4.0_1.0.0.0__31bf3856ad364e35/Microsoft.Management.Infrastructure.dll
----------------------------------------
Microsoft.PowerShell.Security
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Security/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Security.dll
----------------------------------------
Microsoft.WSMan.Management
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.WSMan.Management/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.WSMan.Management.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.DirectoryServices
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
uxsy1dwe
Assembly Version: 0.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.ActiveDirectory.Management
Assembly Version: 10.0.0.0
Win32 Version: 10.0.14393.347
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/Microsoft.ActiveDirectory.Management/v4.0_10.0.0.0__31bf3856ad364e35/Microsoft.ActiveDirectory.Management.dll
----------------------------------------
System.DirectoryServices.Protocols
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices.Protocols/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.Protocols.dll
----------------------------------------
System.ServiceModel
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Runtime.Serialization
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.ServiceModel.Internals
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------
System.IdentityModel
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
----------------------------------------
PresentationFramework
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
CubicOrange.Windows.Forms.ActiveDirectory
Assembly Version: 2.0.5353.28424
Win32 Version: 2.0.5353.28424
CodeBase: file:///d:/account%20management/scripts/powershell%20stuido%20forms/checkaclv3/bin/x64/CubicOrange.Windows.Forms.ActiveDirectory.DLL
----------------------------------------
AlphaFS
Assembly Version: 2.2.0.0
Win32 Version: 2.2.1.0
CodeBase: file:///D:/Account%20Management/Scripts/Powershell%20Stuido%20Forms/CheckACLV3/bin/x64/NTFSSecurity/AlphaFS.dll
----------------------------------------
NTFSSecurity
Assembly Version: 4.2.1.0
Win32 Version: 4.2.1.0
CodeBase: file:///d:/account%20management/scripts/powershell%20stuido%20forms/checkaclv3/bin/x64/NTFSSecurity/NTFSSecurity.DLL
----------------------------------------
rnf0hstb
Assembly Version: 0.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Security2
Assembly Version: 3.2.3.0
Win32 Version: 3.2.3.0
CodeBase: file:///D:/Account%20Management/Scripts/Powershell%20Stuido%20Forms/CheckACLV3/bin/x64/NTFSSecurity/Security2.dll
----------------------------------------
PrivilegeControl
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/Account%20Management/Scripts/Powershell%20Stuido%20Forms/CheckACLV3/bin/x64/NTFSSecurity/PrivilegeControl.dll
----------------------------------------
ProcessPrivileges
Assembly Version: 1.5.7.0
Win32 Version: 1.5.7.0
CodeBase: file:///D:/Account%20Management/Scripts/Powershell%20Stuido%20Forms/CheckACLV3/bin/x64/NTFSSecurity/ProcessPrivileges.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.PowerShell.Activities
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Activities/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Activities.dll
----------------------------------------
Microsoft.PowerShell.Workflow.ServiceCore
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.15
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Workflow.ServiceCore/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Workflow.ServiceCore.dll
----------------------------------------
System.Activities
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Activities/v4.0_4.0.0.0__31bf3856ad364e35/System.Activities.dll
----------------------------------------
System.Activities.Presentation
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Activities.Presentation/v4.0_4.0.0.0__31bf3856ad364e35/System.Activities.Presentation.dll
----------------------------------------
System.Xaml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3928.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
Microsoft.PowerShell.ScheduledJob
Assembly Version: 3.0.0.0
Win32 Version: 10.0.16299.431
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.ScheduledJob/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.ScheduledJob.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Attachments
screenshots.pdf
(204.27 KiB) Downloaded 171 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Executable causing some issues, (0xc0000142)

Post by jvierra »

You have to quit the script after the exception so you don't get repeat and useless exceptions. The first exception is the one that tells you what went wrong.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked