Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Denied error on Temp Dir? #51

Open
sparkle263 opened this issue Apr 4, 2023 · 1 comment
Open

Access Denied error on Temp Dir? #51

sparkle263 opened this issue Apr 4, 2023 · 1 comment

Comments

@sparkle263
Copy link

sparkle263 commented Apr 4, 2023

Hello, I found your repo after not being able to get dfinkle's one to work - though the idea is super promising!

And I can get your module installed with no problem, everything looks good.
But when I go to use it as intended, I keep getting an Accessed Denied error on the temp dir it is trying to use...?
PS is running as Admin, I am a Local admin of the machine, and even if I specify a destination path, it never gets that far...
Am I missing something simple here?

.Net FrameWork Full Version : 4.8.04084
PowerShell Version          : 5.1.19041.2673
OS Version                  : Microsoft Windows 10 Enterprise  v. 22H2 Build. 19045.2728
--- [WITHOUT DESTINATION PATH] -----------------------------------------------------------------------------------

Remove-Item : Cannot remove item C:\Users\USERNAME\AppData\Local\Temp\01aefda8-69bf-48ec-82ea-9ca9b8193d59.tmp: 
The process cannot access the file 'C:\Users\USERNAME\AppData\Local\Temp\01aefda8-69bf-48ec-82ea-9ca9b8193d59.tmp' 
because it is being used by another process.

At C:\Program Files\WindowsPowerShell\Modules\InstallModuleFromGit\1.2.0\Public\Get-GitModule.ps1:53 char:17
+                 Remove-Item (Join-Path $tempDir '*') -Recurse -Force
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\USERNAME...ca9b8193d59.tmp:FileInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand

--- [WITH DESTINATION PATH] ---------------------------------------------------------------------------------------
WARNING: Install-GitModule using path which is not in $Env:PSModulePath (O:\Temp\TestModules)

Remove-Item : Cannot remove item C:\Users\USERNAME\AppData\Local\Temp\f86a921e-06e3-4c96-b089-54ac0ef8fa52.tmp: 
The process cannot access the file 'C:\Users\USERNAME\AppData\Local\Temp\f86a921e-06e3-4c96-b089-54ac0ef8fa52.tmp' 
because it is being used by another process.

At C:\Program Files\WindowsPowerShell\Modules\InstallModuleFromGit\1.2.0\Public\Get-GitModule.ps1:53 char:17
+                 Remove-Item (Join-Path $tempDir '*') -Recurse -Force
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\USERNAME...4ac0ef8fa52.tmp:FileInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand
--------------------------------------------------------------------------------------------------------------------
@DaRacci
Copy link

DaRacci commented Mar 12, 2024

Hey i just fixed this issue by removing the trailing / in the Uri i put in, might work for you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants