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)
Pertaining to #2, you are indeed incorrect. AutoIt is perfectly capable of handling this, in fact one of the basic AutoIt examples is an Installer (tutorial here: http://www.autoitscript.com/forum/topic/82288-installer-creator/)
With a bit of tweaking you could turn that into a great installer, with much less effort than it would take in C#
Maybe if you could tell us exactly what problems AutoIt has been causing you?
Related
Can anyone point me to a list of exit codes for the DirectX End-User Runtimes (specifically the June 2010 version, if it matters)? I apologize in advance if this is a simple matter (it should be), but apparently my google skills are sub-par as I have been unable to find them.
For bonus points:
I'm trying to use InstallShield LE to create an installer for a game I am working on. I downloaded the DirectX End-User Redistributable (June 2010). This redistributable has the user install/extract the DX files to a location they specify with the expectation that the user will then manually run the DXSETUP.exe that is extracted to that location. I handle this silently in a custom action with a location that I have specified (with the intent to clean up these files in a later custom action).
From here, I would like to run the DXSETUP.exe from the location that I specified and respond appropriately to any errors that it encounters (display a message to the user that will help them with their specific problem). I'm currently using a C# executable that I have created to run the DXSETUP.exe, which is run from ISLE via a custom action. Since I couldn't find a list of the possible exit codes for DXSETUP.exe, I decided to display a generic message whenever a non-zero (unsuccessful) exit code is encountered which will contain the exit code returned by DXSETUP.exe. Normally, I would call it a day and wait until users start contacting me with error codes, but this setup does not cover a very specific case.
Apparently, if the user cancels the DXSETUP.exe, it returns an exit code of 0, which is supposed to indicate success. I do not know how to detect/deal with this circumstance. As-is, my game's installer will continue to run happily, leaving the user unable to play the game after the installer finishes due to missing DX files.
I apologize if this came out a bit verbose, but hopefully it clearly and adequately explains my situation.
Don't give the user the chance to cancel by running dxsetup.exe with the /silent flag. This is recommended as a best practice by Microsoft.
I am developing a C# application. I am looking for a way to monitor different events in 3rd party applications.
Example 1: Calculator is running, and I want to know when the user has clicked on "=" button.
Example 2: Skype is running and I want to monitor when the user hits the "Call" button.
Example 3: Word is running and I want to monitor when the user opens the "Font" drop down list.
I am not looking for simple Mouse or Keyboard events.
Take a look at EventSpy, Both of those seams to do what you need.
http://www.codeproject.com/Articles/11918/EventSpy
http://eventspy.codeplex.com/
You basically need to tap into the "Windows Messaging" loop. In order to properly filter the GAZILLION messages that come flying through you'll also need to be able to periodically scan through all of the active windows to see which ones (if any) are relevant to you.
Be aware that this whole subsystem of windows is a GIANT security hole. (I have not worked with it much since NT4 / W95/W98 days so they might have tried attempts to "secure" it since then so it might be even harder to get to than it used to be.
You're going to need a good ide / 3rd party tools to help you get started on your way to have some idea of what you're looking for.
In a "previous" life we used this basic technique to get ~4,000 workstations to install their own software, updates, patches, etc through monitoring for existence of certain windows, controls, etc and "injecting" messages into the Windows Messaging loop to control Application Setup Programs, configuration changes that were not stored in the registry, etc, etc...
Time for another "what am I overlooking" question! Thanks in advance for your guidance, and as ever, you guys rock! :)
.NET 2010 Winforms, but I only have the Express version. I have 05 Pro, but am trying to transition to 2010. If I need to upgrade... well, maybe I'll stick with 05, since this is just for my own amusement.
I want to make a multi-application suite for a project I've got in mind. The project has several components that should interact together, but still be robust and stand-alone.
The components include:
1) A Notification Area utility (I/E System Tray) - I anticipate using this as a quick-launch, data-passing medium, and other minor things. I'd like to keep it as small as possible. Double-click to launch main menu, right-click to launch another app.
2) The Main Menu. This is what would start if you run the program normally, and essentially organizes the other apps.
3-6) These other apps each do some things, but are fairly self-contained.
.
.
Question 1: What is a multi-app or multi-project solution called? I think I'm missing a buzz-word here, because my search-fu isn't getting any results.
For the most part, I'm looking for some pointers, more precise vocabulary, and some suggestions on what existing features can handle these sorts of things.
Question 2: How can I make each of these apps/projects able to launch independently? I don't want to go through the Main Menu each time; I want the ability to start the app from Program Files directly.
Despite that requirement, I also need to check if the Notification Utility is running, and start it if it isn't. The Utility should be running any time any other app is running, and closing it would close all the other apps.
Also, the Notification (and Main Menu) apps need to be able to start the other apps.
Question 3: How can I pass data between the windows?
The concept in my head is to have Window A send a packet to the Utility, which would then pass it to Window B. Window B also needs to send a confirmation packet.
Question 4: How can I set up one of the apps (the Notification Utility)
Question 1 - "Solutions" typically contain one or more projects.
I just try to figure out a good solution on designing the update process for a windows form application i created. I think of a button inside the app for manual checking of an update and checking when starting the app. Only I'm not familiar with technics. I though to have the update setup file in a FTP Server and checking the server for an update with a txt file in there with filename and version info. When app is finished downloading the update, closing and starting the update setup file.
Any suggestions, opinions on the subject?
Application updates these days are one of those necessary evils. Thinking of applications that update automatically, I tend to group them into two categories:
Clean updating, once a month or less often, a speedy update without a lot of nagging or clicking. And definitely no sneaky software included like toolbars and desktop search programs... Firefox tends to be "nice" about updates, though its addons can be naggy.
The other group nags constantly, requires a lot of button clicks or that you reboot, takes a long time to 'unpack' (Adobe Acrobat, looking at you), changes settings against your wishes (Java), or is just generally unpleasant.
With those points in mind, design your automatic update to be as user-friendly as possible, and plan on your users sometimes wanting to skip the update (unless it is critical to operation).
At my company we have a small application that requires updates, but also must function in a very time-sensitive environment. To facilitate updates, we have it do the following:
At startup, a text file is checked on an internal URL (this could be an HTTP or FTP call). The version number is compared to the contents of the file.
If the software is up to date, nothing more is done. If not, a dialog is presented informing the user that the application must perform an update. (In our case there is no option to cancel or wait, but I highly recommend it if you can.)
A setup file is downloaded from the same site, and launched via Process.Start command, with some switches to perform an unattended install/update.
The application is launched after installation and the interruption to user is minimal.
Some things you may want to do differently:
If not checking for updates at startup, provide an option to schedule update checking or manually perform an update check from (for example) a Help menu.
If possible allow the user to cancel or delay an update; there's nothing more frustrating than trying to get work done with a popup dialog asking you to perform an update every few minutes.
Make sure you test your install packages or patches before deployment! (Voice of experience!)
Use ClickOnce http://msdn.microsoft.com/en-us/library/t71a733d%28VS.80%29.aspx
http://www.15seconds.com/issue/041229.htm
Kind regards.
I am looking for a way to monitor Windows dialog during a MSI deployment. Here is my situation: we have machines deploying daily MSIs and once in a while, one of them fail and shows a Windows dialog with an error message.
I am trying to find a way to write a script (maybe in Powershell) which will run every minutes and look for a Windows dialog with an OK button. Is there a simple way to do that?
Thanks!
You can depoly a MSI with options to not display a GUI at all.
Using MSIEXEC with the /quiet option.
Deploy via active directory to machines should not have this problem so I'd be interested in how you are deploying the MSI.
Rather than try to click the dialog, is there a way that you can determine the condition that will cause the error, and handle it?
Although you will find some methods for enumerating windows and posting click messages to them, there are some other things that you migth want to consider:
What if an unrelated dialog box appears that has an Ok button? It could cause problems for your users if an "Are you sure you want to delete the contents of c:\" gets auto-ok'ed.
Also, if your setup is running on Vista/Windows7/server2008 with UAC turned on, then your script will have to run with admin privileges, or any click messages will be rejected.
Can I assume that you are deploying updates to multiples machines (and effectively you wish to know if an update was successful?)
If that is the case, would it not be possible to code such that when the deployed software executes, it reports (via email?) the PC name and the Software Version Number?
You could then simply right a script to start the application periodically and then close it as well.
Darknight