Skip to content

System.UnauthorizedAccessException: Access to the path 'PSReadLineHistoryFile_-1 241867006' is denied. #857

Closed

Description

@yjf2002ghty

PowerShell 6.1.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS C:\Program Files\PowerShell\6>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 0 Keys:


Exception:

System.UnauthorizedAccessException: Access to the path 'PSReadLineHistoryFile_-1
241867006' is denied.
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name
, Boolean& createdNew)
   at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, Engin
eIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineI
ntrinsics engineIntrinsics, CancellationToken cancellationToken)

(The program continued to show this exception message every time I pressed ENTER. )

Environment Data

PowerShell Version: 6.1.2.0
PSReadLine 2.0.0-beta3
OS:Windows 8.1 Professional [6.3.9600]

Steps to reproduce or exception report

I just run the program. The command is:
"C:\Program Files\PowerShell\6\pwsh.exe"
Additional:
Working Directory: C:\Program Files\PowerShell\6
PEB address: 0x7ff6b0b99000 (Image type: 64-bit)
Parent: 7zFM.exe (7760)
Mitigation: DEP (permanent); ASLR (high entropy); CF Guard
Protection: None
Priority: 8
Base priority: Normal

Activity

  1. daxian-dbw commented on Apr 20, 2020

    @daxian-dbw
    Member

    yjf2002ghty The mutex name was fixed to be consistent across powershell sessions in #1061. It's likely resolve this issue. Can you please upgrade to the 2.0.1 version of PSReadLine from PowerShellGallery? See the upgrading section for instructions.

    I will close this issue. If you run into the same with the 2.0.1 version of PSReadLine, please reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions