HIding but still using a shell command
Posted on 2006-05-10
I have an application in which I use several cmd-line instructions to make things happen...
I am using
ProcedureID = Shell("cmd.exe", AppWinStyle.NormalFocus)
to initiate my command shell session and I am typing commands through keybd_event in user32.dll using MapVirtualKey library. I have about 20-35 commands to send to the shell and I find that the only way I can get it to work effectively is when I use AppWinStyle.NormalFocus and I would prefer to use AppWinStyle.Hide This makes the commands fail with a Procedure not found error.
any ideas how I can get this all done without the users seeing the commands? oh, and I have to give periodic feedback on which command is being run so the users do not think that the code has just frozen.