i'm coding a GUI for the chkdsk.exe utility.
i'm launching the dos tools in an hidden windows and grab the stdout in a var.
the issue is that sometimes chkdsk ask (y/n) (in case it has to reboot to do it stuff). how can i send it y or n?
i started thinking about a StdinWrite($foo,"o" & @CR) but it's not the solution.
Might be a better way with Autoit but this way should work just the same.
ControlSend($a, "", "", "Y"); if you wanna sent "Y"
ControlSend($a, "", "", "N"); if you wanna sent "N"
Thanks for your help, but it's not working.
The autoit help file says "ControlSend is only unreliable for command prompts as that works differently to normal windows (seems to check physical states rather than accepting the keystroke messages). For normal windows ControlSend should be way more reliable than a normal Send "
the problem there is that the Control ID is still empty.. you need to look that for yourself.
a small question: when you right click on a drive and choose propreties, then tools, you can do a "check now". it's fully graphical, and it ask if you want to reboot or not.
i'm not seeing any "chkdsk.exe" process into the task manager list, so i was wondering how does windows proceed to check the disk in that case.
some one has an hint?
Not quite sure what you mean, so I will just ramble some babble at you.
The OS can not check the disk with the /f switch if its in use. So if you have a D: drive you can do a chkdsk without rebooting. But if you were to open a folder on D: drive then try to do chkdsk /f d: it would prompt you to do it on the next reboot like C: drive cause its in use. You will not see chkdsk in the process list waiting to check C: drive, it flags the drive as dirty. Whe the OS boots up it will check any disks with that flag set.
thanks a lot to all of you, it's working perfectly.
Can you post you final code for this?