Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to manage other apps with VB

Status
Not open for further replies.

maz11

Technical User
Jul 14, 2005
3
IT
Hi! I need to write a .exe (VB5) in order to have the "live Update" app of Norton Antivirus start & stop at windows startup.
It was quite easy to make it start; then I passed the key "{enter}" to make it connect to its server and download tha latest virus definition.
Here comes the problem: it shows a last window that reads: "Thank you for you update, bla-bla, press FINISH to close this window."
How can I send a {enter} key to that window?
The risk is to send it too early and have the "cancel" button pressed while the download is still in progress.
Furthermore the download time might be quite different from time to time, so a delay before the second {enter} wouldn't work.
I think that a better approach would be to "check" (control?) the app and get some info when the active button is FINISH.
I tried with the help on line, but I'm quite new to Vb and I couldn't get any help.
Thank you guys!
MAZ - Italy
 
Does the Live Update app that you are working with provide a command switch that allows for a silent update? That would probably solve your problem. - Jeff Marler B-)
 
Thanx Jeff, but i had already tried that without success. Moreover I'd rather learn how to manage Vb and apps... Any idea? Bye.
Maz - Italy :cool:
 
OK . . . you could start by getting the Process ID for the Live Update process. Once you have that, you could enumerate all of the forms/windows that belong to that process on a regular basis (probably fired off by a timer control). As soon as the form/window appears where you need to select the OK button (you will know this when you find the correct form caption or form name while enumerating the process' forms) you can use the SendKey or PostMessage commands to start send the OK command. This process is a little more complicated (but not quite as bad as it sounds), but it will give you complete control over other Applications from VB. - Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top