Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends, I am making program to automate software installation in C#.
I hooked mouse & keyboard to listen events performed while setup installs..
First Admin needs to install program which need to be mass installed on connected clients.
So admin runs Server which hooks mouse & keyboard events while perticular installation of software & admin selects unique screen region for screenshot to later matched on client installation process to determine whether specific form has arrived, only then simulate key or click else wait until screenshot matches..(eg.next form came after clicking on Next Button only then simulate click or Keystrokes)

Correct me if i am wrong..plz..

1) Well i know same thing can be possible with Group policy object but it can only install msi packages not the exe setups... so they need to be converted to msi first.. i googed free programs for this conversion but none are free. ( All free programs are just simple exe to msi converters but that converted msi still ask clients something while installing if any error condition is there) & ofcource u need to purchase windows Server licence for domain controller pc's this will not possible for Indian Schools,Cybercafe's,Charitable Trusts..

2) There is no free program to do this task perfectly AutoIT,AutoHotkey tries it well but not every time it succeeds.

3) White Framework on Codeplex is nice but still hangouts sometimes while installing..

So this way is ok? or there is any other way to do this ( i want to automate exe,msi ondemand unattended installation)
Posted
Comments
db7uk 19-Aug-12 9:01am    
Why is the installation so complex? why do you need to re-create the keyboard and mouse clicks? surly creating a basic batch script or exe to perform automated installations and running that through group policy will be better? the problem with these automated ui things is that they will often fail due to inconsistent performance on the client pc and timings.
SamParera 19-Aug-12 10:27am    
Yes, but can u have better solution for this?
& one more thing Is it possible to inject dll to target setup process that can determine Forms that can be shown while installing.. so that we can record Ideal answers for all kind of forms normal + specific error forms so that even if error occures we can automate setup at client side..
barneyman 19-Aug-12 20:39pm    
you can probably extract the msi from the exe by running setup /a

1 solution

First, this is not a recommended way of installing due to the aforementioned difficulties with timing and performance of client pcs.

1.) Place installation exe on share
2.) Create script to automate copying of exe to local temp directory (or wait a really long time after starting the exe), and the keyboard and mouseclicks for the installation (place this script on share as well; powershell or VB.NET and SendKeys could be used for most of this script)
3.) Create GPO based batch script that calls for the powershell script (or your own scripting language script)

Suggestions to mitigate timing issues:

1.) copy the exe from the share to a local temp directory
2.) bring focus to the application you are automating just before every keystroke and mouse click
3.) place an ample amount of time in between each keystroke or mouseclick that you send the target application; While your development machine may have decent performance, other machines in the organization will be much slower. It would be wise to test your end product on a slower, older machine to determine if timings need to be adjusted.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900