Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob Question
#1
Hello,
I am thinking I could use this tool to create app installs for my users at work. So I'm attempting to install 7zip from a network drive. I can get it to start and do the install but when it gets to the "finish" screen the output window tells me Error in Install 7zip: cannot set focus. I know I have to be doing something wrong but I can't figure it out. Can someone point me in the right direction? Here is a sample of my code:

run "\\blah\blah\setpu.exe
act id(1 win("7-Zip 4.57 Setup " "#32770"))
key Y
act id(1 win("7-Zip 4.57 Setup " "#32770"))
act child(1 "&Finish" "Button" win("7-Zip 4.57 Setup " "#32770") 0x200)
key Y

This is on a windows 7 machine. Also, does anyone know how I can get rid of the UAC question at the beginning of the install?

Thanks!
Angie
#2
Maybe the button is disabled at that time. Let the macro wait until enabled.

Or try to replace this:

act id(1 win("7-Zip 4.57 Setup " "#32770"))
act child(1 "&Finish" "Button" win("7-Zip 4.57 Setup " "#32770") 0x200)
key Y

to this:

but id(1 win("7-Zip 4.57 Setup " "#32770"))

---------
Quote:how I can get rid of the UAC question at the beginning of the install?
run "\\blah\blah\setpu.exe" "" "" "" 0x10000
#3
OK I did that and it still just sits on the finish screen. Here is what I have now:

run "\\server\folder\7zip\7z457.exe" "" "" "" 0x10000 ;;run setup and disable UAC
int hwnd=child(1 "&Install" "Button" win("7-Zip 4.57 Setup " "#32770") 0x1)
but id(1 win("7-Zip 4.57 Setup " "#32770"))
key Y

Any ideas?
#4
If keyboard and but don't work, use a mouse command.

lef 5 5 hwnd
#5
Thank you very much! I was able to get it running.
#6
OK since I got the other macro to work I created a macro to install Adobe Acrobat Pro. Its working just fine. But I'm having a few problems at the end. The very last screen does the install and then when finished, the finish button becomes available. Right now i just have the macro pausing for 360 seconds. But the problem is it could be faster on some machines than others. So what I was thinking would be if it would just wait until the finish button becomes available and then click the button for me. Is there a way to accomplish this?
Thank you very much!!
#7
To add code, use "Wait" dialog, "wait for window visible" action. Capture the button. The macro will wait until the button is visible. If the button is always visible but initially disabled, use "wait for enabled" action instead.


Forum Jump:


Users browsing this thread: 1 Guest(s)