0

I hope my question is logical.

Suppose I have third-party basic installation program. The first window is "I agree" checkbox, then click on "Next" button, then select installation folder, then click "Finish" button and the installation begins.

Is there any way to hook into the installation and do all of the clickings on checkbox and buttons programmatically? Maybe there is some way to monitor which dlls and functions are called and then do it by myself?

theateist
  • 13,879
  • 17
  • 69
  • 109
  • @karlphillip, I looked at it and, maybe I misunderstood something, but I don't understand how using it I'll know what function in what DLL I should call in order "Next", "Finish" or whatever action be done? – theateist Dec 24 '13 at 02:20
  • 1
    There's also [winapioverride32](http://jacquelin.potier.free.fr/winapioverride32/), and you can grab it's source code to see how it's done. – karlphillip Dec 24 '13 at 02:25
  • What's wrong with the `/quiet` command line option for msiexec? – IInspectable Dec 24 '13 at 02:41
  • @IInspectable, how quiet will help me? I need to interact the installation programatically. For example I know that the installation has 3 steps: 1 - select install path 2- check/uncheck modules, 3 - select username. I need be able to fill all that information programatically – theateist Dec 24 '13 at 03:25
  • It will be as quiet as you want it to be. You can specify all public properties on the command line, as explained in the [Command-Line Options](http://msdn.microsoft.com/en-us/library/aa367988.aspx). The Windows Installer also provides an automation interface. To list all properties, have a look at [List Products, Properties, Features, and Components](http://msdn.microsoft.com/en-us/library/aa369767.aspx). – IInspectable Dec 24 '13 at 11:00

1 Answers1

0

Take a look at winapioverride32 source code:

WinAPIOverride is an advanced api monitoring software for 32 and 64 bits processes. You can monitor and/or override any function of a process. This can be done for API functions or executable internal functions.

It tries to fill the gap between classical API monitoring softwares and debuggers. It can break targeted application before or after a function call, allowing memory or registers changes; and it can directly call functions of the targeted application.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Maybe I don't explain myself correctly. I don't follow how using WinAPIOverride I'll be able to press buttons, fill information and so on – theateist Dec 24 '13 at 04:01
  • I apologize for the simplicity of my answer. This subject is really extensive and there's no way I'll be able to provide a step by step tutorial for this. With the WinAPIOverride you'll be able to monitor how the window is created and which elements are being positioned inside it. To send events (clicks) to specific components you'll have to [use either `SendMessage()` or `PostMessage()`](http://stackoverflow.com/a/10011814/176769). – karlphillip Dec 24 '13 at 04:08
  • I understand. I'll try to figure out how using WinAPIOverride to monitor how the window is created and which elements are being positioned inside it – theateist Dec 24 '13 at 04:17
  • Have you actually ever tried using this on an installer? Installer processes are special. – IInspectable Dec 24 '13 at 11:02