Sign in to follow this  
Followers 0
Want2script

script stalling, after the "run" command

4 posts in this topic

I'm new to Autoit, but have a huge need for scripting.

I downloaded AutoIT(v3.3.6.1) and SciTE (full-version, v1.79), and installed via defaults -- on an XP Pro SP3 PC.

I followed the first two tutorials, and had good results and started getting excited about all of the potential uses.

Then I hit a snag at tutorial #3. Instead of WinZip, I downloaded the newest copy of IZArc -- I didn't want to install WinZip and have it hijack all of my file associations. I figured installing IZArc would upgrade my older version, and give me a chance to work with AutoIt in a similar fashion to the third tutorial.

I created a folder, and included the installation file and the script -- so there wouldn't be a problem with paths, long filenames, etc. I ran a manual install of IZArc, and used the "AutoIt Window Info" tool to collect relevant specs, as I'd done in the Notepad tutorial. When I ran the script, it balked at the first window of the app's installation. Also, it skipped the "Open File - Security Warning" window, that runs during a manual install.

So I started at the end of my script, and started commenting out the commands, line by line. I found my problem on the first line of code. When I executed -- Run("IZArc4.1.2.exe") -- the script skipped the "Are you sure you want to run this software?" window, and went to the first window of the application installation. At this point the script became unresponsive when I tried to use the WinWaitActive command. I tried to let it sleep for a few seconds, and then tried both the command to issue "ALT+N" and just the "n" key, so that it would go to the next part of the install. I also tried to issue a "TAB", so I could see another part of the window come into "focus". But nothing seemed to work.

I had the same results when I tried to script an install for "WinMD5sum", a GUI program to create a file's hash value. I also tried to re-install Windows SP3, and got the same results. When I've used the "AutoIt Window Info" tool, it "sees" the different parts of the installation window for IZArc, WinMD5sum, and Windows XP SP3 -- so I have an idea that AutoIt will work, once I learn how to use it.

I've checked the forums, and googled the problem -- the results don't seem relevant and I'm not sure if I'm stating the problem correctly.

Although far ahead of my current AutoIt abilities, I experimented with the SciTE tool, AU3Recorder -- and was able to create a functioning script. But, I want to be able to do it the "right" way -- by way of key commands -- so that if the script is run on a PC with different display settings, it will still work.

I'm very embarrassed to ask, but could someone help me with the first line of code? (but, hey ! it's my 3rd tutorial -- that counts for something, right ?)

I hope this makes sense, and further hope that someone is familiar with this problem and can help me get onto my second line of code !!

Regards,

W2S

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Q: Is it possible to perform a silent or an unattended install of IZArc?

A: Yes. Start IZArc installation with /SILENT and /NOCANDY switches e.g.

runwait ("IZArc4.1.2.exe /SILENT /NOCANDY")
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Thanks for your response, iamtheky...

My objective was to learn how to use AutoIt, by testing on a relatively benign sort of application. By doing this, I hoped to better understand how to install the many programs that don't have a "silent" install switch, or that need some change to a default value.

It's not that I'm trying to install IZArc necessarily -- it's that I'm trying to get over a scripting hurdle, that I've encountered during three different installations.

Regards,

W2S

Share this post


Link to post
Share on other sites

Well, I've done some research and discovered that the warning is a result of file that is saved as an Alternate Data Stream (ADS) -- which triggers the Attachment Execution Services (AES) to evaluate the file in one of three categories:

* file is potentially harmful

* publisher could not be verified

* <no nags>

if the file is on your local machine -- right-click, Properties, tab:General,

under the file attributes, you'll see the following text...

"Security: This file came from another computer and might be blocked to help protect this computer." and the "Unblock" button.

Hit the "Unblock" button

(after hitting the button, if you return to Properties, tab:General -- the security text and the button have been eliminated)

Although I've not finished the script, the following commands work as expected:

Run("IZArc4.1.2.exe")

WinWaitActive("Setup - IZArc 4.1.2", "Click Next to continue", 3000)

Send("!n")

Guess I'm not a newbie anymore, huh ??

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  
Followers 0