Jump to content

Recommended Posts


I'm fairly new to AutoIT and am looking to automate an .exe installer. I have the script down for the most part but i'm running into a few difficulties. This installer fully installs the software BUT also serves as the upgrade installer. The issue i'm running in to is on the path selection screen. If the path doesn't exist, I get a popup box asking if i want to create the path. That popup has this Window Info:

>>>> Window <<<<
Title:  Folder Not Found!
Class:  #32770
Position:   775, 465
Size:   368, 149
Style:  0x94C801C5
ExStyle:    0x00010101
Handle: 0x0000000000490ACC

>>>> Control <<<<
Advanced (Class):   
ControlClick Coords:    

>>>> Mouse <<<<
Position:   923, 587
Cursor ID:  0
Color:  0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Folder C:\DXONE\Data\DocFiles\ not found.  Create?

>>>> Hidden Text <<<<

I've exhausted my Google-fu and tried every which way of having that Yes button clicked to no avail. My script ALWAYS stops on the second dialogue box for directory creation. Here is what I currently have.

AutoItSetOption("WinTitleMatchMode", 2)
$hWnd = ("Dentrix Enterprise Setup for")
WinActivate ($hWnd)
WinWaitActive($hWnd,"&Next >") ;Welcome Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:3]")
WinWaitActive($hWnd,"&Next >") ;Enter Installation Code Screen
ControlFocus ($hWnd, "", "Edit1")
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"C:\Program Files (x86)\DXONE") ;Select Destination for Application Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"C:\DXONE\") ;Select Destination for Writable Folders Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
If WinExists("Folder Not Found!", "") Then;Optional dialogue box to create new folder
   WinActivate("Folder Not Found!", "")
   Send ("!y")
WinWaitActive($hWnd,"C:\DXONE\Data\DocFiles\") ;Select Destination for Document Center Images Folder
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
If WinExists("Folder Not Found!", "Folder C:\DXONE\Data\DocFiles\ not found.  Create?") Then;Optional dialogue box to create new folder
   WinActivate("Folder Not Found!", "")
   Send ("!y")
WinWaitActive($hWnd,"&Next >") ;Default Logon Clinic ID Screen
ControlFocus ($hWnd, "", "Edit1")
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"&Next >") ;Enter Custom Code Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"Install Letter Merge add-in for Microsoft Word 2007/2010") ;Optional Software Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"DXONE") ;Shortcut Folder Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive($hWnd,"&Next >") ;Ready to Install Screen
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
ControlClick($hWnd, "", 100)

The script dies on the second If WinExists("Folder Not Found!"). I have tried sending the Altkey, utilizing ControlClick but it just sits there. I'd appreciate any direction here or if there is a cleaner way to perform what my script has outlined, that would also be appreciated. I have 60+ workstations that this needs to go on and don't fancy walking around the building that needs this for hours doing so.

Share this post

Link to post
Share on other sites

I'm curious as to how, Are you talking G5 or Enterprise? I should have elaborated as we use Enterprise. I've just tried the arguments above on the Enterprise installer and it does not install. Enterprise is VERY deployment unfriendly (ironic). The Enterprise installer requires input a few times on the install so I'm not sure how a Quiet install would work.

Share this post

Link to post
Share on other sites

It has been a couple of years, so it may well not have been the Enterprise version. I just remember the install being a PITA, but those parameters working. If they do not work now, and doing Dentrix.exe /? yields no info, I would suggest a couple of things: A: even though it looks like the pop up shows no class or title info, do you see a separate process for it apart from the main install? B: If all else fails, look at the IUIAutomation thread in the Examples forum; the simple spy tool can gather more data than the default AutoIt Window Info Tool. 

Share this post

Link to post
Share on other sites

Sadly i've tried the /? after the exe and it yields no arguments. I don't believe the popup window spawns a separate process, this is the UIA Spy output for the Window. I really am not sure, though.

At least we have an element title: [Folder Not Found!] class: [#32770]

Having the following values for all properties: 
Title is: <Folder Not Found!>   Class   := <#32770> controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    775;465;368;149
*** Parent Information top down ***
1: Title is: <Dentrix Enterprise Setup> Class   := <Afx:00400000:3:00010005:00000006:17010B71>  controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    35;35;1846;1006
"Title:=Dentrix Enterprise Setup;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00000006:17010B71""    
0: Title is: <Dentrix Enterprise Setup for>    Class   := <Afx:00400000:3:00010005:00900015:17010B71>  controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    708;344;503;391
"Title:=Dentrix Enterprise Setup for;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00900015:17010B71""   

;~ *** Standard code maintainable ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

_UIA_setVar("oP1","Title:=Dentrix Enterprise Setup;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00000006:17010B71")  ;Dentrix Enterprise Setup
_UIA_setVar("oP2","Title:=Dentrix Enterprise Setup for;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00900015:17010B71") ;Dentrix Enterprise Setup for

_UIA_setVar("FolderNotFound!.mainwindow","title:=Folder Not Found!;classname:=#32770")

;~ Actions split away from logical/technical definition above can come from configfiles 



;~ *** Standard code Flexible***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP1=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Dentrix Enterprise Setup;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00000006:17010B71", $treescope_children) 
Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=Dentrix Enterprise Setup for;controltype:=UIA_WindowControlTypeId;class:=Afx:00400000:3:00010005:00900015:17010B71", $treescope_children) 
_UIA_setVar("FolderNotFound!.mainwindow","title:=Folder Not Found!;classname:=#32770")

*** Detailed properties of the highlighted element ***
UIA_title:= <Folder Not Found!>
UIA_text:= <Folder Not Found!>
UIA_regexptitle:= <Folder Not Found!>
UIA_class:= <#32770>
UIA_regexpclass:= <#32770>
UIA_iaccessiblechildId:= <0>
UIA_handle:= <4130208>
UIA_RuntimeId:= <42;4130208>
UIA_BoundingRectangle:= <775;465;368;149>
UIA_ProcessId:= <15764>
UIA_ControlType:= <50032>
UIA_LocalizedControlType:= <dialog>
UIA_Name:= <Folder Not Found!>
UIA_HasKeyboardFocus:= <False>
UIA_IsKeyboardFocusable:= <True>
UIA_IsEnabled:= <True>
UIA_ClassName:= <#32770>
UIA_Culture:= <0>
UIA_IsControlElement:= <True>
UIA_IsContentElement:= <True>
UIA_IsPassword:= <False>
UIA_NativeWindowHandle:= <4130208>
UIA_IsOffscreen:= <False>
UIA_Orientation:= <0>
UIA_FrameworkId:= <Win32>
UIA_IsRequiredForForm:= <False>
UIA_IsDockPatternAvailable:= <False>
UIA_IsExpandCollapsePatternAvailable:= <False>
UIA_IsGridItemPatternAvailable:= <False>
UIA_IsGridPatternAvailable:= <False>
UIA_IsInvokePatternAvailable:= <False>
UIA_IsMultipleViewPatternAvailable:= <False>
UIA_IsRangeValuePatternAvailable:= <False>
UIA_IsScrollPatternAvailable:= <False>
UIA_IsScrollItemPatternAvailable:= <False>
UIA_IsSelectionItemPatternAvailable:= <False>
UIA_IsSelectionPatternAvailable:= <False>
UIA_IsTablePatternAvailable:= <False>
UIA_IsTableItemPatternAvailable:= <False>
UIA_IsTextPatternAvailable:= <False>
UIA_IsTogglePatternAvailable:= <False>
UIA_IsTransformPatternAvailable:= <True>
UIA_IsValuePatternAvailable:= <False>
UIA_IsWindowPatternAvailable:= <True>
UIA_ValueIsReadOnly:= <True>
UIA_RangeValueValue:= <0>
UIA_RangeValueIsReadOnly:= <True>
UIA_RangeValueMinimum:= <0>
UIA_RangeValueMaximum:= <0>
UIA_RangeValueLargeChange:= <0>
UIA_RangeValueSmallChange:= <0>
UIA_ScrollHorizontalScrollPercent:= <0>
UIA_ScrollHorizontalViewSize:= <100>
UIA_ScrollVerticalScrollPercent:= <0>
UIA_ScrollVerticalViewSize:= <100>
UIA_ScrollHorizontallyScrollable:= <False>
UIA_ScrollVerticallyScrollable:= <False>
UIA_SelectionCanSelectMultiple:= <False>
UIA_SelectionIsSelectionRequired:= <False>
UIA_GridRowCount:= <0>
UIA_GridColumnCount:= <0>
UIA_GridItemRow:= <0>
UIA_GridItemColumn:= <0>
UIA_GridItemRowSpan:= <1>
UIA_GridItemColumnSpan:= <1>
UIA_DockDockPosition:= <5>
UIA_ExpandCollapseExpandCollapseState:= <3>
UIA_MultipleViewCurrentView:= <0>
UIA_WindowCanMaximize:= <False>
UIA_WindowCanMinimize:= <False>
UIA_WindowWindowVisualState:= <0>
UIA_WindowWindowInteractionState:= <2>
UIA_WindowIsModal:= <True>
UIA_WindowIsTopmost:= <False>
UIA_SelectionItemIsSelected:= <False>
UIA_TableRowOrColumnMajor:= <2>
UIA_ToggleToggleState:= <2>
UIA_TransformCanMove:= <True>
UIA_TransformCanResize:= <False>
UIA_TransformCanRotate:= <False>
UIA_IsLegacyIAccessiblePatternAvailable:= <True>
UIA_LegacyIAccessibleChildId:= <0>
UIA_LegacyIAccessibleName:= <Folder Not Found!>
UIA_LegacyIAccessibleRole:= <18>
UIA_LegacyIAccessibleState:= <1048576>
UIA_LegacyIAccessibleDefaultAction:= <Yes>
UIA_IsDataValidForForm:= <False>
UIA_ProviderDescription:= <[pid:10068,providerId:0x3F05A0 Main:Microsoft: Container Proxy (unmanaged:uiautomationcore.dll); Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]>
UIA_IsItemContainerPatternAvailable:= <False>
UIA_IsVirtualizedItemPatternAvailable:= <False>
UIA_IsSynchronizedInputPatternAvailable:= <False>


Share this post

Link to post
Share on other sites

I found a cheap way to get past this, i'm sure it's not the right way however. I replaced the whole If WinExists loop with just a brute force Send ("!y") and it works. So either something is wrong with my If statement or I have no idea. The only other problem I'm having is that when i compile the script and deploy it, the installer runs but it doesn't start because the dialogue window with the button controls is not active. Once I click on it the script kicks in.

Share this post

Link to post
Share on other sites
Posted (edited)

I contacted Dentrix Enterprise support and it looks like all my work is in vain. According to the documentation they sent the newest installer will support a silent install flag and an .ini file to pass arguments to it. At least i tried :)

Edited by terrigan

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

  • Create New...