Start and use an external application
-
Hello to everybody! I've been programming in c# for a couple of months and got a problem in an application i'm creating for a little company. my application lets you control a little transponder reader, linked to the pc by a serial cable. this application should also let you update the firmware, using an external executable thet was created by another software house. this external program shows a little form with an "update!" button. users should click on this button to start firmware updating. the problem is, my boss doesn't want this little form to appear and wants instead the firmware to be updated without users have to click on this external form. i found the code of an old c++ program they used to do this. it used the function setTimer to give the little form a value corresponding to "enter" key, immediately starting the firmware update. is there any way to do this in c#? please understand i am relatively new to the world of programming. i studied a little java at the university and a little c# by myself. i'd really appreciate any help on this, because i can't really cope with this. oh and by the way sorry for my bad english. thanks in advance, Rey9999
-
Hello to everybody! I've been programming in c# for a couple of months and got a problem in an application i'm creating for a little company. my application lets you control a little transponder reader, linked to the pc by a serial cable. this application should also let you update the firmware, using an external executable thet was created by another software house. this external program shows a little form with an "update!" button. users should click on this button to start firmware updating. the problem is, my boss doesn't want this little form to appear and wants instead the firmware to be updated without users have to click on this external form. i found the code of an old c++ program they used to do this. it used the function setTimer to give the little form a value corresponding to "enter" key, immediately starting the firmware update. is there any way to do this in c#? please understand i am relatively new to the world of programming. i studied a little java at the university and a little c# by myself. i'd really appreciate any help on this, because i can't really cope with this. oh and by the way sorry for my bad english. thanks in advance, Rey9999
Hi, 1. Checkout if the external program allows to you to have command line options for updates. like /u etc, to find out use /? or /help 2. Otherwise, use process ProcessInfo to call the application and use Process.Showwindow = false (dont remember the exact function name) and use Sendkeys "{SPACE}" if you still wish to do the old C++ way. 3. The otherway would be to use Win32API to execute commands and get hold of the window.
-
Hi, 1. Checkout if the external program allows to you to have command line options for updates. like /u etc, to find out use /? or /help 2. Otherwise, use process ProcessInfo to call the application and use Process.Showwindow = false (dont remember the exact function name) and use Sendkeys "{SPACE}" if you still wish to do the old C++ way. 3. The otherway would be to use Win32API to execute commands and get hold of the window.
thanks for your fast reply! i tried solution no. 1 but this application takes no parameters. so i tried solution no. 2 but i noticed the "keystroke" is sent to my form, not to the external application; i think it's because my form is seen as the active application, not the external executable. i'd like to try solution no. 3 but i don't really know how to do it. i know i may sound annoying but can you give me a hint on using this Win32API stuff? i wish i knew more about programming but you know italian universities... thanks alot, Rey9999