aaronparker / intune

Scripts and tools for use with Microsoft Intune
https://stealthpuppy.com
MIT License
255 stars 53 forks source link

I am Chinese, and the display language of the Windows 10 operating system is Simplified Chinese. After running this script, several user folders became English. #9

Open iamtornado opened 2 years ago

iamtornado commented 2 years ago

I think this is a great script, Redirect-Folders.ps1 However, I also found a problem. I am Chinese, and the display language of the Windows 10 operating system is Simplified Chinese. After running this script, several user folders became English. before redirect: image after redirect: 变为英文1 变为英文2

How can I keep the original language after redirection? below is log file: Redirect-UserFoldersToAnotherDrive-133031914572062416.log

aaronparker commented 2 years ago

The display names for these folders is configure with hidden file named desktop.ini. That file probably exists in each folder and has an entry for the display name for the folder in English. If you edit the file, you can replace the display name.

iamtornado commented 2 years ago

Thanks! I will try

iamtornado commented 2 years ago

I can not find desktop.ini . The image below is a screenshot before running the script image image

iamtornado commented 2 years ago

think you very much! this problem have been solved. I made a little change to the script. A little change has been made to the robocopy command in the function move-file. The following figure is the modified part of the code: image

The following figure is the original code of this part: image

As you can see from the picture, I actually copied all the files in the original path to the new path, including the desktop.ini file

aaronparker commented 2 years ago

Excellent. Thanks for posting the solution