Jump to content

- - - - -

Format virtual drive silently

format silent silently .cmd vb.net

  • Please log in to reply
4 replies to this topic

#1 echrisco

  • Members
  • 2 posts
    United States

Posted 3 weeks ago

Hi there.

I'm using ImDisk to create a temporary Drive in RAM.

I have tried commands from my app in VB.Net and by running a .cmd or .bat file with 

imdisk -a -s 1G -m X: -p "/fs:ntfs /q /y"

No matter what I do, I get the Virtual Drive okay, but it always pops up confirmation dialogs to format the drive, an alert that it's in use and can't be locked (not trying to lock it anyway), and then confirmation that it has been formatted. 

I want to whole thing to be done invisibly, and preferably w/out scripts. (Just using VB.net commands).

Thank you for your help.

#2 steve6375


    Platinum Member

  • Developer
  • 6541 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
    United Kingdom

Posted 3 weeks ago

I use

imdisk -a -s 1234m -m X: -f C:\temp\fred.img -x 63 -y 255 -p "/FS:NTFS /Q /Y"

which seems similar...

#3 v77


    Silver Member

  • Team Reboot
  • 516 posts

Posted 3 weeks ago

Do you have administrative privileges for calling imdisk? If not, the format fails and then Windows prompts you to format.

#4 dickfitzwell



  • Members
  • 25 posts

Posted 3 weeks ago

From format /?

"/X  Forces the volume to dismount first if necessary.  All opened handles to the volume would no longer be valid."

imdisk -a -s 1G -m X: -p "/fs:ntfs /q /y /x"

#5 echrisco

  • Members
  • 2 posts
    United States

Posted 3 weeks ago


Also tagged with one or more of these keywords: format, silent, silently, .cmd, vb.net

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users