Advertisement

09.06.2007 at 06:38AM PDT, ID: 22810696
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

AutoIt ShellExecute function

Asked by LLMorrisson in Scripting Languages

Tags: ,

I am currently trying to automate an install using AutoIT 3, but I can't get something to work right.

Before anyone asks what the point of this script it ;) I have stripped it down for simplicity but the problem still occurs.

Here is the code;

[code]
ShellExecute("install.msi")
MsgBox(1, "Msg1", "Msg1")
WinWaitActive("Open File - Security Warning")
Send("!r")
MsgBox(1, "Msg2", "Msg2")
[/code]

When I run this install.msi file a windows dialog appears to warn me that it is unsigned. This is the only dialog that comes up as part of the install and I want to get autoit to automatically hit the "Run" button.

However although ShellExecute is supposed execute the file then carry on through the script, it doesn't seem to do that in this case.

The reason I have put the MsgBoxes there is to try and figure out if it was simply a problem with WinWaitActive finding the correct window but even the MsgBox line doesn't get executed.

This is what happens;

1. I run script above.
2. AutoIt executes "install.msi".
3. The dialog comes up warning that the msi file is unsigned.
4. At this point you would expect the first MsgBox (Msg1) to be displayed but it is not.
5. Only after I hit "Run" on the warning dialog (manually) does Msg1 get displayed.

From this, I can tell that the script is pausing right after the ShellExecute line until I hit Run on the warning dialog.

The question is why? How can I get around this?

Thanks,
LLMorrisson.Start Free Trial
 
Loading Advertisement...
 
[+][-]09.07.2007 at 07:02AM PDT, ID: 19847768

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Scripting Languages
Tags: autoit, shellexecute
Sign Up Now!
Solution Provided By: jweinpert
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.05.2008 at 04:37PM PST, ID: 20591905

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628