Share via

Diskpart assign command using script file not detecting UTF-8 paths

Anonymous
2023-01-31T17:39:17+00:00

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 of assign used with path containing only ASCII characters then script passes.

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

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-31T18:53:42+00:00

    Thanks Igor Leyko for advice I'll post this in Q&A forum.

    Was this answer helpful?

    0 comments No comments
  2. Igor Leyko 111K Reputation points Independent Advisor
    2023-01-31T18:33:41+00:00

    Hi,

    My name is Igor, it's a pleasure for me to help others and I'll do all my best to help you.

    It is more effective to ask such questions at Q&A forum https://learn.microsoft.com/en-us/answers/quest...

    It is oriented to admins and corporate users, and this forum - to home users so local experts may have no corresponding knowledge, sorry.

    Was this answer helpful?

    0 comments No comments