Git Product home page Git Product logo

Comments (7)

jbaumann avatar jbaumann commented on June 26, 2024

Could you please check whether the problem is to create the link in the directory (e.g. by creating a link to a file in the parent directory) or whether the problem is that the target file cannot be accessed?
I think that starting the script with admin rights (by elevating it) should only be the last resort.

from pio_and_stm32cubeide.

olivierov avatar olivierov commented on June 26, 2024

Sorry, I don't know how to do that.
But, even if the target link file is accessible, without elevating VSCode, I have this error:
`SETUP_CUBEMX Error: Cannot create symlink in directory 'lib/STLinkedResources'
While if I run VSCode with Administrator privileges, it works.

from pio_and_stm32cubeide.

olivierov avatar olivierov commented on June 26, 2024

To avoid this pb, I've changed the property of the shortcut of VSCode

image

from pio_and_stm32cubeide.

jbaumann avatar jbaumann commented on June 26, 2024

Can you experiment with the access rights and the ownership of the directory? It looks as if there is some problem there that doesn't allow a normal user to create symlinks. To me it looks strange that you cannot create a symlink in a directory that you own...

from pio_and_stm32cubeide.

olivierov avatar olivierov commented on June 26, 2024

In an administrator cmd console window I'm able to create a symlink using mklink.
In a standard user cmd console window I'm not allowed to create a symlink using mklink. It returns the following error:
You do not have sufficient privilege to perform this operation.

Searching more information, I found this Microsoft page in which we can read that for security reasons, elevating to administrator privileges is mandatory to create symbolic links.

from pio_and_stm32cubeide.

jbaumann avatar jbaumann commented on June 26, 2024

I now had the time to look at this. The explanation is very clear, Microsoft thinks that creating symbolic links is too dangerous for normal users. Thank you for the link to the Microsoft page explaining this.
I think there are two options:

  • Run VSCode with admin rights. I do not like this option because this way VSCode has by far too many rights.
  • Change the user rights to allow the creation of symbolic links. This seems to be possible, but I do not know how exactly this is done.

from pio_and_stm32cubeide.

olivierov avatar olivierov commented on June 26, 2024

Change the user rights to allow the creation of symbolic links.
This seems to be possible, but I do not know how exactly this is done.

My account has Administrator access right and I cannot create a symbolic link in a 'standard' user context (neither VSCode nor Powershell). I have to run the mlink command in an 'Administrator' context to be allowed to create a symbolic link.

I tried using pyuac which sounds great... but I'm not able to setup it (I don't know Python very much).

from pio_and_stm32cubeide.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.