Giter VIP home page Giter VIP logo

Comments (9)

Josverl avatar Josverl commented on May 11, 2024 1

mklink

For windows 10 users who have Developer Mode enabled, the mklink command will now successfully create a symlink even f the user is not running as an administrator.

You can go to the For developers page at any time to enable or disable Developer Mode: simply enter "for developers" into the Cortana search box in the taskbar.

from micropy-cli.

BradenM avatar BradenM commented on May 11, 2024

Thanks! I will definitely take a look at this when I get a chance today.

from micropy-cli.

vbolshakov avatar vbolshakov commented on May 11, 2024

Hard link and Directory Junction differ. Directory Junction created without any problems

from micropy-cli.

vbolshakov avatar vbolshakov commented on May 11, 2024

X:!(2019-08-30 17-50)>mklink /H B A
Access is denied.

X:!(2019-08-30 17-50)>mklink /J B A
Junction created for B <<===>> A

from micropy-cli.

vbolshakov avatar vbolshakov commented on May 11, 2024

Also, when using Win API there is no problems to create Hard Link - i use Far (File and achieve manager) and able to create both without admin privileges.

from micropy-cli.

BradenM avatar BradenM commented on May 11, 2024

When I get to my desktop today, I'm thinking about implementing a fallback on windows like this:

import ctypes

kdll = ctypes.windll.LoadLibrary("kernel32.dll")

kdll.CreateSymbolicLinkW(UR"<project_dir>\.micropy\some-stub-link", UR"<micropy_folder>\some-stub", 1)

Thoughts?

from micropy-cli.

vbolshakov avatar vbolshakov commented on May 11, 2024

Not work. Create Symlink only with administrative privileges.

from micropy-cli.

vbolshakov avatar vbolshakov commented on May 11, 2024

Ok. There is no easy way... Pywin32 ad requirement or https://github.com/juntalis/ntfslink-python that just copy part of Pywin32.

from micropy-cli.

BradenM avatar BradenM commented on May 11, 2024

Oh, for some reason I thought the CreateSymbolicLinkW method used a junction.

I will take a look at ntfslink-python, thanks.

from micropy-cli.

Related Issues (20)

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.