Hi
cmd is not UNICODE's compliant by default, try cmd /K chcp 65001 to launch it to test again your script.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Community,
I am using diskpart command with script file (/s flag) and assigning a VHD file to a temporary directory which contains non-ACII characters, problem here is diskpart reports this directory as invalid however when I assign folder with DiskManagement GUI this works perfectly fine.
Diskpart script contains below commands:
create vdisk file=C:\tp93847435_f7ad_4f7e_b589_9a6e0c8fee0d.vhd maximum=5
select vdisk file=C:\tp93847435_f7ad_4f7e_b589_9a6e0c8fee0d.vhd
attach vdisk
rescan
convert mbr
create partition primary
format fs=ntfs label="install" quick
assign mount="C:\Users\someuser\AppData\Local\Temp\UP_€_d99S\tp14de94c0_147d_4fe9_96e3_405f604bb26d"
Everything except last line works fine. Also, I've verified that if assign command used with path containing only ASCII characters, then script executes without any error.
Would like to know if this is expected?? If not, how we can solve this issue or any command line alternative available?
NOTE: I am saving script file in UTF-8 format
Hi
cmd is not UNICODE's compliant by default, try cmd /K chcp 65001 to launch it to test again your script.
Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.
This is likely because diskpart doesn't support non-ASCII characters in the path while using the script with the '/s' flag.
One solution to this problem is to use a directory name with only ASCII characters. Another option could be to use a different command-line utility that supports non-ASCII characters in the path, such as mountvol.
Example:
mountvol X: "C:\Users\someuser\AppData\Local\Temp\UP_€_d99S\tp14de94c0_147d_4fe9_96e3_405f604bb26d"
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.