Jump to content

Recommended Posts

Posted

I'm trying to pass that thing there with the following code. The file is on the network , but is accessible from the user account i'm on and will be in the future from this path.

; No relevant code before
$i=3
$title = "Adobe Acrobat 8.2."& $i &" Standard - Setup"
ShellExecute("\\prod\...AcrobatUpd82"& $i &"_all_incr.msp")
WinWaitActive("Open File - Security Warning")
WinActivate("Open File - Security Warning")
If @OSVersion = "Win_VISTA" Then ControlClick("Open File - Security Warning", "", "[CLASS:Button; INSTANCE:2]")
If @OSVersion = "Win_XP" Then ControlClick("Open File - Security Warning", "", "[CLASS:Button; INSTANCE:1]")

;do some stuff there

From the info box

>>>> Window <<<<
Title:  Open File - Security Warning
Class:  #32770
Position:   317, 283
Size:   404, 309
Style:  0x94C80AC4
ExStyle:    0x00010101
Handle: 0x0095078C

>>>> Control <<<<
Class:  Button
Instance:   1
ClassnameNN:    Button1
Name:   
Advanced (Class):   [CLASS:Button; INSTANCE:1]
ID: 4423
Text:   &Open
Position:   216, 141
Size:   78, 23
ControlClick Coords:    47, 12
Style:  0x50010000
ExStyle:    0x00000004
Handle: 0x00840714

Sending keystroke is not what i'm looking for. And my problem is that i can't ControlClick on that Open button nor ControlSend it.

  • Moderators
Posted

Eldo,

Welcome to the AutoIt forum. ;)

I am afraid that I cannot help you much other than to offer this thought:

Whenever I see windows with titles like "Security Warning" I am not surprised to find that they cannot be automated - if there really is a security problem it would hardly be secure if the warning itself could be bypassed by a simple script, would it! :blink:

I will try and do better next time. :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

I had the same problem when trying to update Reader. If you create an environmental variable called SEE_MASK_NOZONECHECKS and set it to 1 it will disable the prompt. I did it with VB script but I'm sure you could use AutoIt.

http://support.microsoft.com/kb/889815

Posted

I had the same problem when trying to update Reader. If you create an environmental variable called SEE_MASK_NOZONECHECKS and set it to 1 it will disable the prompt. I did it with VB script but I'm sure you could use AutoIt.

http://support.microsoft.com/kb/889815

Ok , thanks for your input you two. It's my first script on AutoIt. Really time saving soft when you have 900 PC

Code for .au3 based on the microsoft kb

EnvSet("SEE_MASK_NOZONECHECKS","1")
; Your script here
EnvSet("SEE_MASK_NOZONECHECKS","0")

No more security box opening. however it's not a real solution. I found that the Run() or ShellExecute were faulty , they did not return "1" nor "0" . And that is a problem for automation because the script is virtually stuck on these functions.

Posted

What if you did

EnvSet("SEE_MASK_NOZONECHECKS","1")
run("\\prod\...AcrobatUpd82"& $i &"_all_incr.msp /qn")
EnvSet("SEE_MASK_NOZONECHECKS","0")

This would do the install silently

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
  • Recently Browsing   0 members

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