Jump to content

Recommended Posts

Posted

Hi,

I have just started using AutoIt to see if it could be useful to automate software deployment.

I have created a small simple script using Au3Record but once compiled or built it just pauses indefinitely. OS is Win 10 using Windows Defender which I have disabled to test. Any ideas as to why this is happening? Script below and all help appreciated.

 

region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000809)  ---

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000809' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000809->' & $aResult[1] & ')')
EndIf

EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
 WinWait($title,$text,$timeout)
 If Not WinActive($title,$text) Then WinActivate($title,$text)
 WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---


Run('C:\Users\Martin\Desktop\EDI\EnterpriseDesktopIntegration.exe')
_WinWaitActivate("Enterprise Desktop Integration Setup","The Setup Wizard wil")
Send("{ENTER}")
_WinWaitActivate("Enterprise Desktop Integration Setup","I &accept the terms ")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Select the way you w")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Enter the details of")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","WCF Service Base URL")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Ready to install Ent")
Send("{ALTDOWN}i{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Click the Finish but")
Send("{ALTDOWN}f{ALTUP}")
#endregion --- Au3Recorder generated code End ---

Posted (edited)

that tool is no longer really supported, and frankly, it doesn't produce anything really repeatable and reliable.

In any case, that installer may have silent installation switches. let me look.

 

also, when you post code, click the button that looks like this, <> and then post code in there

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000809' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000809->' & $aResult[1] & ')')
EndIf

EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
 WinWait($title,$text,$timeout)
 If Not WinActive($title,$text) Then WinActivate($title,$text)
 WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---


Run('C:\Users\Martin\Desktop\EDI\EnterpriseDesktopIntegration.exe')
_WinWaitActivate("Enterprise Desktop Integration Setup","The Setup Wizard wil")
Send("{ENTER}")
_WinWaitActivate("Enterprise Desktop Integration Setup","I &accept the terms ")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Select the way you w")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Enter the details of")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","WCF Service Base URL")
Send("{ALTDOWN}n{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Ready to install Ent")
Send("{ALTDOWN}i{ALTUP}")
_WinWaitActivate("Enterprise Desktop Integration Setup","Click the Finish but")
Send("{ALTDOWN}f{ALTUP}")
#endregion --- Au3Recorder generated code End ---

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted (edited)

it may have silent install switches if that installer is an MSI

if i can download it i can test it and see

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

It is an msi but as soon as you use any silent switches a service doesn't get installed.

Thanks for trying to help I think I'm flogging a dead horse so going back to the vendor.

Thanks again

  • Moderators
Posted

@MartinBurgess if the Vendor is no help, the service not installing with silent parameters is not unusual. You just need to use Orca, go into the Services table and set that function to run always, not just on full install. Will never understand the way some vendors pack their installers...

"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!

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...