Sign in to follow this  
Followers 0
newcome

How can I tell the automated mouse and key strokes in the softeware install are blocked?

11 posts in this topic

I need to automate the install software process. For both Microsoft Windows SDK for Windows 7 and Microsoft Direct SDK 2010, I tried to use silent install mode to install and failed.

When I try to automate it using AutoIt in GUI, the buttons in the install window does not response any "send" command which imitating keyboard action ( or ControlClick command). I only can guess that the software installer might have blocked the automated mouse and key strokes in the both software installer. But how can I for sure this is the case?

Share this post


Link to post
Share on other sites



Didn't the help in the other 2 threads you already have going help with this issue? Stick to one topic and you'll get more useful information.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Okay, you have your point. I will stop post any more question regarding this question.

I use the knowage I learned from this Forum and get conclusion that both Microsoft Windows SDK for Windows 7 and Microsoft Direct SDK 2010 installed must blocked the automated mouse and key strokes. But I'm not confidence enough for my conclusion. Since these 2 software are popular one, and want to get the second opnions from this Forum.

Edited by newcome

Share this post


Link to post
Share on other sites

I am as confused as BrewManNH, newcome. In your last post, I provided you with the silent switches for the SDK. When you say it failed, WHAT failed exactly? How about posting your install code so we can take a look?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi Jlogan3013,

When I run command "DXSDK_Jun10.exe F", it will pop up a "Wicrosoft DirectX SDK" window. After click the button "Next", it will pop up "License Agreement" window.

When I use Controlsend to mark "I accept the terms in the license agreement", the window has no response. I also tried to use controlClick to click "Back" button and it failed too.

Below is my code:

#RequireAdmin

Opt("wintitlematchmode", 2)

Global $cmd = "C:VcsourceAutoIT_installsw_installDXSDK_Jun10.exe"

Func _WinWaitActivate($title,$text,$timeout=0)

If WinWait($title,$text,$timeout) Then

If Not WinActive($title,$text) Then WinActivate($title,$text)

WinWaitActive($title,$text,$timeout)

Else

ConsoleWrite("WinWaitActivate: " & @error)

EndIf

EndFunc

FileChangeDir("C:VcsourceAutoIT_installsw_install")

Run(@ComSpec & ' /c' & "DXSDK_Jun10.exe F")

;Local $shwndInstall = WinWait("SDK for Windows")

_WinWaitActivate("Microsoft DirectX SDK", "Welcome to the Microsoft DirectX SDK")

ControlClick("Microsoft DirectX SDK", "Welcome to the Microsoft DirectX SDK", "[CLASS:Button;INSTANCE:2]")

;_WinWaitActivate("Microsoft DirectX SDK", "License Agreement")

_WinWaitActivate("Microsoft DirectX SDK", "MICROSOFT SOFTWARE LICCENSE TERMS")

ControlSend("Microsoft DirectX SDK", "I &accept the terms in the License Agreement","[CLASS:Button;INSTANCE:1]","{+}")

;ControlClick("Microsoft DirectX SDK", "License Agreement", "[CLASS:Button; INSTANCE:3]")

window_info.pdf

Edited by newcome

Share this post


Link to post
Share on other sites

And, as was suggested before, did you try the /S or /U to make the installation silent?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Hi JLogan3013,

Thank you very much! By using the option " /U " the problem is solved (I thought /F is the option I need to use. I was WRONG. ).

The worked code is as following:

#RequireAdmin

FileChangeDir("C:VcsourceAutoIT_installsw_install")

Run(@ComSpec & ' /c' & "DXSDK_Jun10.exe /U")

Many thanks for this community.

Edited by newcome

Share this post


Link to post
Share on other sites

You could also just use Run, and get rid of the ComSpec piece:

#RequireAdmin

RunWait("C:VcsourceAutoIT_installsw_installDXSDK_Jun10.exe /U")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Hi JLogan3o13,

Thank you! Your sugesstion works! I can not belive that after so long struggle to find a solution, th solution turns out so simple!!!!

#RequireAdmin

RunWait("C:VcsourceAutoIT_installsw_installDXSDK_Jun10.exe /U")

By the way, how could I post code as you do in a different format?

Edited by newcome

Share this post


Link to post
Share on other sites

zorphong, thank you. I get it now .

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