Jump to content

Autoit problems during RunOnceEx procedure


Recommended Posts

Hello,

I'm writing here as I need help for some autoit scripts during windows xp unattended setup.

The scripts have no problem in normal working OS, but they freeze for no reason during RunOnceEx procedure.

I fear some race conditions, but I don't have sure proof..

I cannot use silent install as many options cannot be set from it.

The affected programs are just 4 on a total of 30:

winzip 10 -- it stops at updates

codec ffdshow 2005 -- it stops at virtualdub path

zone alarm 055 -- it stops at welcome 2 (config web surfing access)

mail washer 01 -- it stops at finish (setup end)

I'll attach the scripts if someone can check (last lines contain commands to run self-extracting executables for the settings)

I just need to fix these programs to be able to make a cd and finally reinstall the OS

Please help!

winzipA.au3

zalarmA.au3

Link to comment
Share on other sites

Does anyone have an autoit script ready for any of these programs?

It seems like autoit cannot recognize one of the installation windows and it freezes. I'm not sure though. I tried to use scite, but I get the same result

Someone answer please. Help! :)

Edited by Pao
Link to comment
Share on other sites

This may help with your FFDShow installer. Advice: Don't use WinDetectHiddenText unless you have to.

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
;~ Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)

; launch program blocking focus
BlockInput(1)

$pid = _Run("codffds.exe")

; language
_WinWaitActive("Installer Language", "Please select a language.")
Send("{ENTER}")

; intro
_WinWaitActive("ffdshow-20050703", "Welcome to the ffdshow Setup Wizard")
Send("{ENTER}")

; license
_WinWaitActive("ffdshow-20050703 ", "License Agreement")
Send("{ENTER}")

; options
_WinWaitActive("ffdshow-20050703 ", "Choose Components")
Send("{DOWN 7}{SPACE}{ENTER}")

; video codecs
_WinWaitActive("ffdshow-20050703", "Select supported video codecs")
Send("{ENTER}")

; audio codecs
_WinWaitActive("ffdshow-20050703", "Select supported audio codecs")
Send("{ENTER}")

; video filters
_WinWaitActive("ffdshow-20050703", "Select video filters which should be enabled by default")
Send("{ENTER}")

; audio filters
_WinWaitActive("ffdshow-20050703", "Select audio filters which should be enabled by default")
Send("{ENTER}")

; avisynth plugin path
_WinWaitActive("ffdshow-20050703", "Avisynth plugins directory")
Send("{ENTER}")

; virtualdub path (default is C:\Programs\ffdshow)
If _WinWaitActive("ffdshow-20050703", "Select VirtualDub filters directory", 10) Then
    If Not WinActive("ffdshow-20050703", "Select VirtualDub filters directory") Then WinActivate("ffdshow-20050703", "Select VirtualDub filters directory")
    Send("C:\Proglit\virtualdub\plugins\ffdshow")
    Send("{ENTER}")
EndIf

; install path
If _WinWaitActive("ffdshow-20050703 ", "Choose Install Location", 10) Then
    Send("{RIGHT}{LEFT 7}")
    Send("Codecs\")
    Send("{TAB 3}{ENTER}")
EndIf

; start menu
_WinWaitActive("ffdshow-20050703 ", "Choose Start Menu Folder")
Send("{ENTER}")

; complete
_WinWaitActive("ffdshow-20050703 ", "Installation Complete")
Send("{ENTER}")

; complete
_WinWaitActive("ffdshow-20050703 ", "ffdshow has been installed on your computer.")
Send("{ENTER}")

ProcessWaitClose($pid)

; settings
RunWait("codffdsS.exe")

;resumes user input
BlockInput(0)

Func _Run($file)
    If Not FileExists('codffds.exe') And Not FileExists(@ScriptDir & '\codffds.exe') Then
        BlockInput(0)
        Exit 1
    Else
        FileChangeDir(@ScriptDir)
    EndIf
    Return Run('"' & $file & '"')
EndFunc   ;==>_Run

Func _WinWaitActive($title, $text = '', $timeout = 9999)
    If WinWait($title, $text, $timeout) Then
        WinActivate($title, $text)
        WinWaitActive($title, $text)
        Return True
    Else
        BlockInput(0)
    EndIf
EndFunc   ;==>_WinWaitActive

If it fixes the problem then you can do similar to the rest. If I have to automate, then I will use WinWait and Control* functions if possible. Prefer silent install as little can go wrong.

:)

Link to comment
Share on other sites

Oh thanks MHz for the answer. I'll try your method.

I managed to run ZoneAlarm and Mailwasher in the meantime. First problem was undetected keyboard commands, the second unrecognized window name.

Link to comment
Share on other sites

Yeah, I know MailWasher...is a Inno Setup so uses Inno Setup switches. Zonealarm, heck, sorry, does that work for you? :), only trouble for me to install it, It will not install for me.

Link to comment
Share on other sites

Yes, Zone Alarm finally installs correctly. I'll upload the working scripts (the old format)

I still cannot install the other two program though. And it's not a window name problem..it's like the script freezes on its own at same point.. dunno, I'll try again

p.s: I forgot to hide winzip serial inside the uploaded script.. how can I remove it?

Edited by Pao
Link to comment
Share on other sites

I tried a windows install with ONLY Winzip and Directshow in RunOnceEx but nothing.. they stop!!

I need someone who has managed to create a working autoit script for these 2 programs during unattended installation

:D:):D

Edited by Pao
Link to comment
Share on other sites

FFdShow using a silent install method within the script that I use. If not suitable, then I could try to automate it. I downloaded WinZip 11.1 from Download.com. Would that version be suitable to make a script with?

p.s. remove winzip attachment in 1st post using edit button at that post and use the combo box to select the attachment and the press the delete symbol.

Edited by MHz
Link to comment
Share on other sites

No, stop all! Sorry, I was completely wrong.

I found the reason for the scripts freezing.. there are windows which doesn't show in runonceex! I discovered this by dividing the scripts in two parts. Damn, all that checking and the reason was simple..

Anyway it would be a great thing if one could see where the script blocked directly from autoit icon

Thanks for the help mhz!

Goodbye

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...