thisthat 0 Posted June 10, 2014 So I am trying to write an automation script on my host computer that controls actions being done in the client. From what I have tried and read on this forum, it seems as if this is not very feasible/elegant. I just wanted to confirm that this is the case and that there is isn't some super fancy method of doing so. So far I have just been sending keystrokes and using the Sleep function a lot. Aside from that I can't really think of anything. Also, I am trying to get my script to automate some installations on my host. But sometimes the script does not recognize the installation window [e.g. the Java installation] even when I use the WinWait/WinWaitActivate functions. I also use the AutoItWindowInfo to get all the correct titles and stuff needed so I don't think I am using the mentioned functions incorrectly. Is there some reason why they don't recognize the Java installation and other installation windows?? On the same note, I can't seem to bypass the Windows User Account Control and automate accepting that with keystrokes or MouseClicks. Is this not a feasible thing to do and must be done manually? Thanks!!! TT Share this post Link to post Share on other sites
AdamUL 98 Posted June 11, 2014 if you are trying to install Java (JRE) there is a way to do this silently. There is no need to automate the GUI. Depending on the other software you are trying to install, most should be able to be installed silently as well. Are you trying to run the scripts in the VM or through the VCenter console? There is a way to control UAC for admins, using my >UAC UDF. Look at _UAC_GetConsentPromptBehaviorAdmin, _UAC_SetConsentPromptBehaviorAdmin, and the $UAC_ELEVATE_WITHOUT_PROMPTING value. Adam Share this post Link to post Share on other sites
Bert 1,427 Posted June 11, 2014 does your software supports command-line switches? For example if you wanted to install Winzip you could use "setup.exe /q". ( I have no idea if Winzip supports command-line for installation purposes. just an example) The Vollatran project _____ I'm famous My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites
jdelaney 313 Posted June 11, 2014 (edited) You can use PowerCLI (powershell api into vsphere) to copy in your script, and then execute, from your station: https://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/ (VMware vSphere PowerCLI 4.0 Update 1 includes more than 160 cmdlets, a set of sample scripts, and a function library that make managing and automating the vSphere easier than ever before.) Doesn't specifically answer your question, but it's a good place to start after you have the UAC piece solved. The execute function allows you to run as admin, which should get around the UAC...if silent params can be done, then an autoit script wouldn't be needed at all. Edited June 11, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Share this post Link to post Share on other sites