Windows 10 - 带有空格和 PATH 的用户名 [英] Windows 10 - Username with whitespace and PATH

查看:27
本文介绍了Windows 10 - 带有空格和 PATH 的用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装 Windows 10 后,我将我的管理员用户创建为 Miha Šušteršič.现在,当我安装需要修改环境变量 PATH 的程序时,它们中的大多数都不会被添加.例如,MongoDB 和 Git 会发生这种情况,但 npm 被正常添加.

Upon installing Windows 10 I created my admin user as Miha Šušteršič. Now when I install programs that need to modify the environment variable PATH, most of them don't get added. For instance this happens with MongoDB and Git, but npm got added normally.

我认为这是变量路径中空格的问题.我尝试将我的用户名重命名为 M.Sustersic,但系统文件夹 UsersMiha Šušteršič 没有得到更新.

I think this is an issue with the whitespace in the path to the variables. I tried renaming my username to M.Sustersic, but the system folder UsersMiha Šušteršič did not get updated.

有没有办法让我自动更改此文件夹名称(因此 UsersMiha ŠušteršičAppData 上的其余应用程序依赖项不会出错)还是我需要重新安装 Windows?

Is there a way for me to change this folder name automatically (so the rest of the app dependencies on UsersMiha ŠušteršičAppData don't get bugged) or do I need to reinstall windows?

这里还有什么我遗漏的吗?我尝试自己添加依赖项,但到目前为止没有任何效果.

Is there something else I am missing here? I tried adding the dependencies on my own, but nothing worked so far.

推荐答案

参见 这篇知识库文章 更改用户配置文件目录的名称.

See this KB article to change the name of the User Profile directory.

完成此操作后,您可能需要创建一个链接,以防您的任何应用保留本地路径配置.

After you do this, you may want to make a link just in case any of your apps keep local path configuration.

cd C:Users
mklink /D "Miha Šušteršič" M.Sustersic

这篇关于Windows 10 - 带有空格和 PATH 的用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆