Executable causing some issues, (0xc0000142)

Ask your Windows 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.
Post Reply
DaveMcDonald
Posts: 14
Joined: Tue Sep 04, 2018 8:41 am

Executable causing some issues, (0xc0000142)

Post by DaveMcDonald » Fri Aug 23, 2019 11:36 am

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: 162
Joined: Thu Jun 01, 2017 7:20 am

Re: Executable causing some issues, (0xc0000142)

Post by brittneyr » Fri Aug 23, 2019 11:41 am

[TOPIC MOVED TO WINDOWS POWERSHELL FORUM BY MODERATOR]
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
jvierra
Posts: 13732
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Executable causing some issues, (0xc0000142)

Post by jvierra » Fri Aug 23, 2019 11:46 am

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: 14
Joined: Tue Sep 04, 2018 8:41 am

Re: Executable causing some issues, (0xc0000142)

Post by DaveMcDonald » Tue Aug 27, 2019 8:11 am

Here is the function.

Code: Select all

Function Change-SecACL
{
<#
.SYNOPSIS
This function will modify a security group ACL.

.DESCRIPTION
This function will run as a job with diffrent credeitanls (supplied at start of the script).
It will ADD or REMOVE an ACE from the ACL. It only currently adds or removes the Write-Members allow
ACE for the User.

.EXAMPLE
PS C:\> Change-SecACL mcdonalddw ETIAll -AR ADD

.NOTES
Since the whole script runs as a service account, this funtion actually runs as a job with diffrent
credentials. We do not want the serivce account modifying AD objects. Admin account credentials must be
supplied at the start of the script.

.PARAMETER $USER
An AD User Account

.PARAMETER $Group
An AD Security Group

.PARAMETER $AR
Add or Remove the user from the group ACL
#>
param (

[Parameter(Mandatory = $true)]
[System.String]$User,
[Parameter(Mandatory = $true)]
[System.String]$Group,
[ValidateSet("ADD", "REMOVE")]
[System.String]$AR
)

# Must be run as a job with diffrent crednetials
Write-Host "Starting Job"
Try
{
Start-job -InitializationScript ({ Import-Module Microsoft.PowerShell.Security }) -PSVersion 3.0 -name "Set-ACL" -Credential $admincred -ScriptBlock {
$AR = $args[2]
$userinfo = get-aduser $args[0]
$groupinfo = Get-adgroup $args[1]
#Create the SID object
$Sid = New-Object System.Security.Principal.NTAccount($userinfo.SamAccountName)
$sid = $sid.Translate([System.Security.Principal.SecurityIdentifier])
$identity = $sid
$aclpath = "AD:\$($groupinfo.DistinguishedName)"
#Get the current ACL
$GroupACL = Get-Acl -Path $aclpath
#Create the access control entry we wish to modify.
$ACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule(
$identity,
[System.DirectoryServices.ActiveDirectoryRights]::WriteProperty,
[System.Security.AccessControl.AccessControlType]::Allow,
"bf9679c0-0de6-11d0-a285-00aa003049e2",
[DirectoryServices.ActiveDirectorySecurityInheritance]::All
)
#Decide if we are going to add the ACE to the ACL or remove the ACE from the ACL.
switch ($AR)
{
"ADD" { $GroupACL.AddAccessRule($ACE); break }
"REMOVE" { $GroupACL.RemoveAccessRule($ACE); break }
}
#Set the ACL with the modifications. This will preserve the original entries other than the one we modified.
Set-Acl -path $aclpath -AclObject $GroupACL

} -ArgumentList $User, $Group, $AR
}
catch
{
if ($_.Exception.InnerException)
{
Write-Host $_.Exception.InnerException.Message
}
}
#Wait for the job to complete.
#Write-Host "Waiting for Job"
Wait-job -name "Set-Acl"
Receive-Job -Name "Set-ACL"
}

User avatar
jvierra
Posts: 13732
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Executable causing some issues, (0xc0000142)

Post by jvierra » Tue Aug 27, 2019 10:44 am

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 $_
}

User avatar
jvierra
Posts: 13732
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Executable causing some issues, (0xc0000142)

Post by jvierra » Tue Aug 27, 2019 12:16 pm

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: 14
Joined: Tue Sep 04, 2018 8:41 am

Re: Executable causing some issues, (0xc0000142)

Post by DaveMcDonald » Mon Sep 16, 2019 7:02 am

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) Not downloaded yet

User avatar
jvierra
Posts: 13732
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Executable causing some issues, (0xc0000142)

Post by jvierra » Mon Sep 16, 2019 8:14 am

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.

Post Reply