An error occurred while trying to create a file in the destination directory waves

How to Fix "An Error occurred while trying to create a file in the destination directory setup was unable to create the directory"in Windows

Hi Guys, Today I am Going to tell you How to Fix “An Error occurred while trying to create a file in the destination directory setup was unable to create the directory”in Windows 10 & 11?

Check Out This: How to Fix “Some of these settings are hidden or managed by your organization” in Windows 10 & 11?

Are you Looking for “How to Fix An Error occurred while attempting to create an directory? (or) “How to Fix An Error occurred while preparing the installation When Installing any Softwares?

You are at the Right Place to Get Your Answers & Solve the Issue/Error.

Let’s See About it.

Steps For How to Fix “An Error occurred while trying to create a file in the destination directory setup was unable to create the directory”in Windows 10 & 11? 

Method 1: Disabling Controlled Folder Access.

Step 1: First of all, Goto Search and Search for Virus & Threat Protection and Click on it.

Step 2: Navigate to the Controlled Folder Access Option and Click on the Manage Controlled Folder Access Option.

Step 3: Now Turn off the Controlled Folder Access Option and Navigate Back to Virus & Threat Protection.

How to Fix "An error occurred while attempting to create the directory: C:..." When Trying to Install an Autodesk software?

Step 4: Now Temporarily Disable the Third-party antivirus (or) Windows Defender Services (Real-Time Protection, Cloud-Delivered Protection, Automatic Sample Submission, Tamper Protection)

Step 3: Restart Your PC and Now You can Install any Softwares Without Any Errors.

Note – After Installation You Can Enable the Third-party antivirus (or) Windows Defender Services.

Method 2: Giving Full Permission to Installation Directory

Step 1: Goto that Directory Where the Software is Going to be Installed.

For Example 

C:ProgramDataMicrosoftWindowsStart MenuProgramsApplication

Step 2: Now Go to the Directories Start Menu (or) Programs (or) Application and Right Click on the Folder and Navigate to Security Tab and Click the Edit Button.

Step 3: Now Click Add and type Everyone then click on Check Names. Press Ok.

Step 4: Make sure that the Full Control, Modify, and Write box is checked, and click OK to save the new settings.

(or)

Step 3: Navigate to Security Tab and Click the Advanced Button and Click on the Change Permissions Option and Mark the Include inheritable permissions from the object’s parent.

Step 4: Now Click the Apply button to save your changes and click on Continue and delete the inherited permissions.

Step 5: Restart Your PC and Now You can Install any Softwares Without Any Errors.

That’s It. You’re Done. Have a Nice Day.

@@@ Leave Comments @@@

##Stay Safe Guys And Live Happily ##

@grekkster

Issue Type: Bug

When I open VSCode, after a while error message pops up:

Error
C:Program FilesMS VS Codeuninst000.exe
An error occured while trying to create a file in the destination directory:
Access denied.
Click Retry to….

I have reinstalled Code with recommended new version with silent updates. It’s not a problem with PC, it happens on work PC and home PC.

VS Code version: Code 1.26.1 (493869e, 2018-08-16T18:38:57.434Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.89GB (10.45GB free)
Process Argv C:Program FilesMicrosoft VS CodeCode.exe
Screen Reader no
VM 0%

Extensions (19)

Extension Author (truncated) Version
pascal ale 6.3.0
vscode-eslint dba 1.5.0
xml Dot 2.3.2
code-runner for 0.9.4
rest-client hum 0.19.1
mssql ms- 1.4.0
csharp ms- 1.15.2
Go ms- 0.6.89
PowerShell ms- 1.8.4
debugger-for-chrome msj 4.10.0
vscode-docker Pet 0.2.0
java red 0.30.0
vscode-yaml red 0.0.15
vscode-fileutils sle 2.10.3
sonarlint-vscode Son 1.5.0
vscode-java-debug vsc 0.12.2
vscode-java-pack vsc 0.3.0
vscode-java-test vsc 0.8.0
vscode-maven vsc 0.10.0

![vscode-err](https://user-images.githubusercontent.com/35041444/45201834-1bad6180-b277-11e8-87d9-5891a921c60b.png)

@joaomoreno

The UserSetup can only be installed on a path which your user owns. Your user probably doesn’t have write access to C:Program Files. Why don’t you take the default installation directory?

@grekkster

I believe i have one and only administrator account on one of the PCs with VSCode installation, no other accounts and i installed VSCode into that directory in first place, so i don’t think problem is with the write access. Also before i reinstalled the reccomended distribution, there was no problem at all. But yeah maybe I’ll try to install to some other directory.

And for the second part — I want to decide where my installations go to and i think it’s a common feature for the past 20 years at least.

@joaomoreno

Can you show me a screenshot of Code’s About dialog?

@grekkster

I can paste it if you dont mind since there is a button in About dialog fot that:
Version: 1.27.1 (user setup)
Commit: 5944e81
Date: 2018-09-06T09:21:18.328Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
But this is after update so maybe useless. Yesterday i tried to set VSCode to run as an administrator, then i tried to install updates and it worked without problems. Since then, the error message is gone.

When i get home, maybe i can paste the original About info from my home PC, there should still be the original version with this problem.

@joaomoreno

Right… so did you run the UserSetup as Administrator?

@blackening

image

Also having the same problem, this is the about dialog.

Possibly it has something to do with the specific version.

@grekkster

Here is the copied About info from my home PC:
Version: 1.26.1
Commit: 493869e
Date: 2018-08-16T18:38:57.434Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
problem still here, also installed in program files. I don’t think i’ve run UserSetup as an admin, but i’m not sure.

@grekkster

I can confirm that when i ran VSCode as an admin, the update to 1.27 is installed without any problems.

@joaomoreno

@zhuhang-jasper

Have this issue on Windows 10 64bit. VsCode keeps trying to create the uninstaller setup every time the it runs.
Current workaround is to run VsCode as admin, but it shouldn’t be this way.

Why is this issue closed?

Info
Version: 1.27.2 (user setup)
Commit: f46c4c4
Date: 2018-09-12T16:17:45.060Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@joaomoreno

@zhuhang-jasper If you use the user setup, please install Code in a location that your user has full access to.

@swingguy0

@zhuhang-jasper thanks for posting that it works if you run the program as admin, that worked for me.

RE: @zhuhang-jasper «If you use the user setup, please install Code in a location that your user has full access to.»

I am the only user and admin on my computer and have full edit permissions to the «C:Program Files» directory and am still experiencing this issue.

@joaomoreno

Still:

  • Using the user setup, do not install to Program Files
  • Using the system setup, feel free to install to Program Files

@vscodebot
vscodebot
bot

locked and limited conversation to collaborators

Oct 28, 2018

I don’t know why I am getting this error suddenly whilst using vs code. Please help me, Thanks in advance.

P.S(I don’t think files can be created in an exe right? I’m not sure after seeing this. Maybe do I have to specify where the file should be created and if yes, please tell me how. Else I’m looking for another answer)

(Edit): I tried downloading the system installation instead of the user installation. The system installer installs for all users on the system and needs administrator privileges unlike the user installer which install vs code only the particular user installing it.

Thanks, Codestrip

error

asked Apr 14, 2022 at 6:57

8

my solution for this was to set it to always start as administrator, I don’t feel like reinstalling vscode (newly installed)
It’s not a great solution for those who have multiple users, but I got rid of the error.

Ah, I saw that was a problem within User Permission, there were only 2 options checked. https://prnt.sc/uV-bF_q52Y3Y

I hope my solution will help you.

answered May 11, 2022 at 4:50

mihai ciufudean's user avatar

0

If you run your «vscode» as admin then you won’t see this error
anymore.

  1. Go to your «vscode» install location
  • If not sure then open the start menu.
  • Write vscode.
  • Right click on the icon and click «Open File Location».
  • In a new window there will be again an icon for the «vscode» right click on the icon
  • Again and click «open file location».
  • In another window, there will be an actual vscode’s «exe» file.
  1. Right-click on this file and go to the «send» > «send on desktop» option.
  2. On the Desktop right-click on the icon and go to the properties
  3. Click on Advance Option and Check the «Run as Admin» Option
  4. Click Apply and Ok.
  5. Now if you want Right Click on this icon again and select «pin to taskbar».

Hopefully, you won’t see this error again.

answered Jun 25, 2022 at 20:31

Uniquedesign's user avatar

I also encountered this error.
I tried remove the folder Microsoft VS Code inside C:Users<your username>AppDataLocalPrograms, and problem seems resloved

answered Jun 15, 2022 at 3:02

NinjaDQ's user avatar

I have Microsoft Visual Studio Code version 1.31.1 running in my Windows 8.1, 64 bit machine.

Time to time it prompts me this error.

Visual_Studi0_Code_Error1

When I press «Abort» the window gets closed.
When I press «Retry» it prompts me the same message.
When I press «Ignore» it shows me this.

enter image description here

Another time, when I ignore I received this message.
If you read the error message carefully, you will figure out that it is trying to create different dll file and fail to do so.

Do you have any idea why I’m getting these messages and appreciate any help to resolve this.

enter image description here

asked Mar 20, 2019 at 10:05

Ishara Amarasekera's user avatar

2

In order to modify file in C:Program Files application needs to have administrator privileges. Go to installed directory, right click on Code.exe, «Properties», «Compatibility», check «Run this program as an administrator».

answered Jul 12, 2020 at 9:04

Shahrukh Abdurakhimov's user avatar

1

I am solved the issue.
First of all go to the installed location Example: C:UsersAkashAppDataLocalProgramsMicrosoft VS Code
then in this folder just simply go to properties option and security tab then add the user and Administration account to full system control. Its solved my problem.

answered May 8, 2022 at 15:16

Mr Mezan's user avatar

Windows 10: an error occurred while trying to create a file in the destination directory: setup was…

Discus and support an error occurred while trying to create a file in the destination directory: setup was… in Windows 10 Installation and Upgrade to solve the problem; «an error occurred while trying to create a file in the destination directory: setup was unable to create the directory» now what i do?…
Discussion in ‘Windows 10 Installation and Upgrade’ started by NickPowerman, May 17, 2021.

  1. an error occurred while trying to create a file in the destination directory: setup was…

    «an error occurred while trying to create a file in the destination directory: setup was unable to create the directory» now what i do?

    :)

  2. «an error occurred while trying to create a file in the destination directory setup was unable to create the directory»

    «an error occurred while trying to create a file in the destination directory setup was unable to create the directory» this is the problem i am facing after updating my windows 10 to the latest upgrade. now what i do?

    an error occurred while trying to create a file in the destination directory: setup was... a4e30672-9fa2-4dd2-bb69-353a547df584?upload=true.png

  3. An Error Occurred While Trying to Create A File in The Destination….

    Hi, I’m trying to install an audio production plugin I bought from a vendor to my default plugin folder but keep getting this error? Any idea what could be the issue? I’m running a hp elitebook 8560w (64 bit). I’ve tried running the installer as administrator, installing the latest updates, defragging, virus scans etc, the classic turning everything off and back on again, pulling my hair out etc.

    an error occurred while trying to create a file in the destination directory: setup was... [​IMG]

  4. an error occurred while trying to create a file in the destination directory: setup was…

    «an error occurred while trying to create a file in the destination directory setup was unable to create the directory»

    Might be due to an incomplete file, if you are running Setup media of a program. Is this the case?

Thema:

an error occurred while trying to create a file in the destination directory: setup was…

  1. an error occurred while trying to create a file in the destination directory: setup was… — Similar Threads — error occurred while

  2. Error 1317. An error occurred while attempting to create the directory G:Config.Mis

    in Windows 10 Installation and Upgrade

    Error 1317. An error occurred while attempting to create the directory G:Config.Mis: I downloaded this application named battery limiter, and i used it, it will make annoying sound, so i decide to uninstall it, but there are some issues about it….
  3. Error 1317. An error occurred while attempting to create the directory G:Config.Mis

    in Windows 10 Gaming

    Error 1317. An error occurred while attempting to create the directory G:Config.Mis: I downloaded this application named battery limiter, and i used it, it will make annoying sound, so i decide to uninstall it, but there are some issues about it….
  4. Error 1317. An error occurred while attempting to create the directory G:Config.Mis

    in Windows 10 Software and Apps

    Error 1317. An error occurred while attempting to create the directory G:Config.Mis: I downloaded this application named battery limiter, and i used it, it will make annoying sound, so i decide to uninstall it, but there are some issues about it….
  5. An error occurred while trying to create a file in the destination directory: annoying VS…

    in Windows 10 Network and Sharing

    An error occurred while trying to create a file in the destination directory: annoying VS…: I am getting this error for couple of months now both on windows 10 and windows 11 whenever installing VS code new version. I tried switch of the defender folder control option. But it did not worked. I am getting this error in default installation folder and I change the…
  6. An error occurred while trying to create a file in the destination directory: annoying VS…

    in Windows 10 Gaming

    An error occurred while trying to create a file in the destination directory: annoying VS…: I am getting this error for couple of months now both on windows 10 and windows 11 whenever installing VS code new version. I tried switch of the defender folder control option. But it did not worked. I am getting this error in default installation folder and I change the…
  7. An error occurred while trying to create a file in the destination directory: annoying VS…

    in Windows 10 Software and Apps

    An error occurred while trying to create a file in the destination directory: annoying VS…: I am getting this error for couple of months now both on windows 10 and windows 11 whenever installing VS code new version. I tried switch of the defender folder control option. But it did not worked. I am getting this error in default installation folder and I change the…
  8. keep getting An error has occurred while tryin to create the directory

    in Windows 10 Support

    keep getting An error has occurred while tryin to create the directory: I keep getting «An error has occurred while trying to create the directory» everytime a Client tries to open a folder in my Documents.

    170839

  9. Help! : An error occurred while trying to rename a file in the destination directory:…

    in Windows 10 Installation and Upgrade

    Help! : An error occurred while trying to rename a file in the destination directory:…: I keep getting this error message. I think it is in regards to the RealTek Audio Driver failing to install as well. Any help to get the audio driver to install and to fix this error message would be great!

    [ATTACH]…

  10. An Error Occurred While Trying to Create A File in The Destination….

    in Windows 10 Support

    An Error Occurred While Trying to Create A File in The Destination….: Hi, I’m trying to install an audio production plugin I bought from a vendor to my default plugin folder but keep getting this error? Any idea what could be the issue? I’m running a hp elitebook 8560w (64 bit). I’ve tried running the installer as administrator, installing the…


Windows 10 Forums

Понравилась статья? Поделить с друзьями:
  • An error occurred while trying to copy a file out of memory
  • An error occurred while trying to connect to the java server
  • An error occurred while trying to connect to server please try again later перевод
  • An error occurred while trying to compute required packages
  • An error occurred while the page was being generated please try again later