05-07-2019 04:16 PM
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?
05-07-2019 06:15 PM
Try the /k switch instead of /c
05-07-2019 08:41 PM
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.
@Bob_Schor wrote:
Not sure why you ask this in a LabVIEW Forum.
Because they're trying to do it with LabVIEW?
05-09-2019 02:37 PM
@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.
@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