Crystal Codec Pack 4.3.3
Windows "Hardware Installation" dialog
I am not sure how many of You are using this codec pack (it's pretty old), but here is the script anyway. The reason I am posting it because it includes a solution I was looking for a long time: how to bypass that annoying "Hardware installation" dialog
that windows displays when an unsigned driver is about to be installed.
I added some comments inline so You can easily understand it. Here is the code:
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Script Function: Install KS Codec Pack 4.3.3
; Author: Csimbi
;This is the function we will call every now and then to close all those annoying dialogs.
If WinActive("Hardware Installation") Then
ControlClick("Hardware Installation","", "Button1")
;Start installation of the codec pack
;Wait until installer is started.
;Send an enter key to bypass the installation confirmation (Yes is selected by default, so we just need to hit enter).
;The first dialog is expected to pop up soon, so we start our watchdog function that will close that annoying dialog. We run the script every 250 msecs.
AdlibEnable ("getRidOfAnnoyingWindow", 250)
;The next annoying dialog is windows file protection. We wait for this dialog.
WinWaitActive("Confirm File Replace")
;The dialog has three buttons: Yes, No, and No to all. We emulate keypress on "a" key so that we select the "No to all" button.
;Installation will complete without further interference with the UI, so we can disable the watchdog function.
;And finally quit.