Jump to content
Sign in to follow this  
Aapjuh

Setup with optional google chrome install checkbox

Recommended Posts

Aapjuh

Hi all,

Situation:

I been trying to automate an setup of a program and i encountered a problem,

during the setup u'll get the option to install google chrome with 2 checkboxes default turned on.

Problem:

now the problem is that AutoitInfo can't seem to discover the combobox controls and ControlViewer can see it (see report below) and they dont have a 'tab'

i dont know how to be able to 'controlclick' them to turn them off.

Tried:

i tried 'tabs', random controlclick instance guessing, searched alot (imo google is getting pretty filled with crap) and something with '_IEAttach' but i cant wrap my head around it no clue how it works.

Anyone have a solution for me?

Thnx in advance,

Aapjuh.

Report:

###AutoIt Control Viewer Report File###
Environment
===========
System:   Microsoft Windows 7 Home Premium 64-bits
Aero:    Enabled
Window
======
Title:    CCleaner v3.23-installatie
Class:    #32770
Style:    0x94CA084C
ExStyle:  0x00010100
Position: 388, 297
Size:    503, 389
Handle:   0x0000000000040414
PID:      2376
Path:    C:\Users\eigenaar\Desktop\Aapjuh\CC.exe
Control
=======
Class:    #32770
Instance: 1
ID:
Style:    0x5000044C
ExStyle:  0x00010000
Position: 23, 73
Size:    450, 228
Handle:   0x0000000000020420
Text:
=======
Class:    pfBrowser
Instance: 1
ID:    63843368
Style:    0x56000000
ExStyle:  0x00000000
Position: 23, 73
Size:    450, 228
Handle:   0x0000000000020428
Text:
=======
Class:    Shell Embedding
Instance: 1
ID:
Style:    0x56010000
ExStyle:  0x00000000
Position: 23, 73
Size:    450, 228
Handle:   0x0000000000020426
Text:
=======
Class:    Shell DocObject View
Instance: 1
ID:
Style:    0x56010000
ExStyle:  0x00000000
Position: 23, 73
Size:    450, 228
Handle:   0x00000000000203EE
Text:
=======
Class:    Internet Explorer_Server
Instance: 1
ID:
Style:    0x56000000
ExStyle:  0x00000000
Position: 23, 73
Size:    450, 228
Handle:   0x000000000003041C
Text:
=======
Class:    Static
Instance: 13
ID:    1200
Style:    0x54000100
ExStyle:  0x00000020
Position: 23, 73
Size:    450, 228
Handle:   0x000000000002042A
Text:

Share this post


Link to post
Share on other sites
jerem488

For this setup, you can download the slim installer. The slim installer haven't the google chrome install.


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites
Aapjuh

For this setup, you can download the slim installer. The slim installer haven't the google chrome install.

thnx for reply.

slim installer for ccleaner? haven't seen it on piriform..

anyhow, even if there is a slim installer, what if i ever encounter a setup without one? how would i deal with the problem im having?

Edited by Aapjuh

Share this post


Link to post
Share on other sites
Aapjuh

Global $InstallCCleaner = @TempDir & "/CCleaner.exe"
Global $DownloadPathCCleaner = "http://www.piriform.com/ccleaner/download/slim/downloadfile"
Global $DownloadCCleaner = InetGet($DownloadPathCCleaner, @TempDir & "/ccsetup.exe", 1, 1)
Do
Sleep(250)
If InetGetInfo($DownloadCCleaner, 4) Then
EndIf
Until InetGetInfo($DownloadCCleaner, 2)
InetClose($DownloadCCleaner)
Run($InstallCCleaner)

http://www.piriform.com/ccleaner/download/slim/downloadfile is the slim version path

but when its in an autoit script and gets executed like in the code above it somehow gets the standart version instaid...

howcome?

Edit:

when i click the hyperlink in this post i dont get the slim.exe instaid get send to the main page of piriform, when i copy paste the link in firefox i do get the slim.exe

how can this be fixed? the Slim.exe is not in the http://www.piriform.com/ccleaner/download/slim/ source code so i can stringregex source to it

Edit2:

fixed it useing the following code found deep within the forum :) modified for chrome

If WinExists("[CLASS:#32770]", 'Google Chrome') Then
  $oIE = _IEAttach ("[CLASS:#32770]", 'Embedded')
  If IsObj($oIE) Then
   $oInstallChrome = _IEGetObjByName ($oIE, 'install1')
   If IsObj($oInstallChrome) Then
    _IEAction ($oInstallChrome, 'click')
   EndIf
   _IELoadWait ($oIE)
   $oIE = 0
   EndIf
   Sleep(2000)
   ControlClick("[CLASS:#32770]", "", "[CLASS:Button;INSTANCE:2]")
EndIf
Edited by Aapjuh

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
Sign in to follow this  

×