LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format a USB to FAT32

I am attempting to format my usb to FAT32. When I run the code it prompts me to confirm diskpart and then when I accept it opens the diskpart cmd line but does not continue to input the commands. How do I suppress the prompt and get it to continue sending the commands?

 

Format USB.PNG

 

0 Kudos
Message 1 of 4
(2,888 Views)

Try the /k switch instead of /c

0 Kudos
Message 2 of 4
(2,862 Views)

So you want to suppress the UAC prompt when diskpart runs? I'm not sure if that's possible without jumping through a few hoops (even running LabVIEW as admin doesn't seem to help in this case).

 

You might try using the format command, as that doesn't seem to need UAC. This doesn't help with lower level disk management, but if you just need to clean a drive it might do the job. Note the line ending passed into the Standard Input - the format command waits for user confirmation, so this simulates the user pressing Enter.

 

format usb.png

 


@Bob_Schor wrote:

Not sure why you ask this in a LabVIEW Forum. 


Because they're trying to do it with LabVIEW?




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
Message 3 of 4
(2,811 Views)

@MichaelBalzer wrote:

So you want to suppress the UAC prompt when diskpart runs? I'm not sure if that's possible without jumping through a few hoops (even running LabVIEW as admin doesn't seem to help in this case).

 

You might try using the format command, as that doesn't seem to need UAC. This doesn't help with lower level disk management, but if you just need to clean a drive it might do the job. Note the line ending passed into the Standard Input - the format command waits for user confirmation, so this simulates the user pressing Enter.

 

format usb.png

 


@Bob_Schor wrote:

Not sure why you ask this in a LabVIEW Forum. 


Because they're trying to do it with LabVIEW?


Yeah,  this is a more an Oessy thing.

 

You can get a faster answer by posting a wrong answer than a question---Djikstra


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(2,764 Views)