Sign in to follow this  
Followers 0
mrb

MSI with unsigned drivers on Vista

8 posts in this topic

So I'm trying to write a script that will execute an .msi installer silently and automate all the prompts for installing the unsigned drivers, then once the .msi is finished, launch another script that carries out carious other actions. The problem is I can't use RunWait() because I need the script to watch for WinWaitActive windows for the "Windows Security" prompts for the unsigned drivers and then pass each one Send("!i"). This portion works fine but once it's done the final send the script continues and launches my batch script which runs another msiexec, which fails because the first .msi still hasn't finished. I can't wait for the msiexec process to close because it's an on-demand service that will remain after the install has finished. Any suggestions?

Share this post


Link to post
Share on other sites



Run("mysuperinstallerprogramexample.exe")

WinWaitActive("Windows Security")
Send("!i")

While WinActive("My super installer title example") ; this would be the title of the main installer window
    Sleep(100)
WEnd

Run("nextprogram.exe")

Or something to that effect.

Share this post


Link to post
Share on other sites

Try doing it with this code. I'm not sure if it will suppress the Unsigned drivers dialog or not.

ShellExecuteWait("C:\some\path\file.msi", "/qn+")

If it doesn't suppress that message then you may have to try something like

Opt("WinTitleMatchMode", 2)
$pRun = ShellExecuteWait("C:\some\path\file.msi", "/qn")
While ProcessExists($pRun)
    If WinActive("Windows Security") Then Send("!i")
WEnd

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

So my solution was to RunWait the MSI and Run a separate AutoIt script beforehand that did the following:

while True
        if WinExists("Windows Security", "&Install this driver software anyway") then
        WinActivate("Windows Security", "&Install this driver software anyway")
        Send("!i")
    EndIf
    Sleep(2000)
wEnd

Then I kill the process after the RunWait()

In theory this works great- however the sen("!i") portion doesn't seem to be working on that window. If I bring up other windows with an alt-i option it will switch to themso I know it's functioning at some level. Additionally this was working for me just the other day. I must say this is quite frustrating.

Share this post


Link to post
Share on other sites

I've also tried sending tab followed by enter but this has no effect either. Anyone else run into this problem before?

Share this post


Link to post
Share on other sites

just wanted to follow this one up, can't find anything related!

Same problem, in Vista, a warning comes up when unsigned drivers are installed. I can only assume Vista prevents interaction with these diolog boxes.

I have tried the following:

WinWait("Windows Security")
send("!i")

WinWait("Windows Security")
ControlClick("Windows Security", , "[CLASS:can't remember what this was; ; INSTANCE:1]")

Sorry, can't remember what the class was, changed it since, was copied from the Window Info util though. The buttons don't have an ID I can use like most other things.

Martin

Share this post


Link to post
Share on other sites

Have you tried running the script as admin? Admin level scripts can access some admin level dialogs.

Share this post


Link to post
Share on other sites

cheers for the reply!

I run all scripts with #requireadmin at the top.

BUT, when I have been testing a failure on specific dialogues, I have just copied that portion of code out into a new temp script and ran that. These temp scripts have not had #requireadmin in them, so may have been part of my troubleshooting problems, will remember this for next time I am giving it a go, thanks for your help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0