newcome Posted June 20, 2012 Posted June 20, 2012 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?
BrewManNH Posted June 20, 2012 Posted June 20, 2012 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 GudeHow 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
newcome Posted June 20, 2012 Author Posted June 20, 2012 (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 June 20, 2012 by newcome
Moderators JLogan3o13 Posted June 20, 2012 Moderators Posted June 20, 2012 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? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
newcome Posted June 21, 2012 Author Posted June 21, 2012 (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 June 21, 2012 by newcome
Moderators JLogan3o13 Posted June 21, 2012 Moderators Posted June 21, 2012 And, as was suggested before, did you try the /S or /U to make the installation silent? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
newcome Posted June 21, 2012 Author Posted June 21, 2012 (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 June 21, 2012 by newcome
Moderators JLogan3o13 Posted June 21, 2012 Moderators Posted June 21, 2012 You could also just use Run, and get rid of the ComSpec piece: #RequireAdmin RunWait("C:VcsourceAutoIT_installsw_installDXSDK_Jun10.exe /U") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
newcome Posted June 21, 2012 Author Posted June 21, 2012 (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 June 21, 2012 by newcome
zorphnog Posted June 21, 2012 Posted June 21, 2012 (edited) Use a CodeBox or AutoItBox http://www.autoitscript.com/forum/index.php?app=core&module=help&do=01&HID=31 Edited June 21, 2012 by zorphnog
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now