Jump to content

DOS Boxes


 Share

Recommended Posts

I am new to AutoIt, so please be kind.  I'm writing a script that will run an executable that upgrades OpenSSH on several remote computers.  It first uninstalls the old version then installs the new version.  I'm all the way through, but have run into one problem.  When it gets to the part of the executable where it actually starts installing/extracting all the files, about midway through, it stops and a DOS box pops up with a

____________ key already exists.
Overwrite (y/n)?

There are actually 3 boxes in a row with the same "Overwrite (y/n)?" prompt.  I've tried using

Send ("{y}")
Send ("{Enter}")

but no luck.  Any ideas please?

Edited by BigRedEO
Link to comment
Share on other sites

What command are you running to extract the files?

It probably has a param to force overwrite, like /y, or something.  Oh, is this durring install?  There might be silent params, or you can probably delete the file as a setup step.

There are all kinds of Win* functions, and control* functions to manipulate gui's...I'd suggest you read up on those as a last resort.

WinGetHandle
WinExists
ControlGetHandle
ControlSend
ControlClick
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

What command are you running to extract the files?

It probably has a param to force overwrite, like /y, or something.

 

It's an executable - .exe file, so I'm simply doing "ControlClick" for each "Next" or "OK" button, so the command just before that extract is

WinWaitActive ("Create Password and Group files", "Choose user type for SSHD")
ControlClick ("Create Password and Group files", "&Next", 1)

and then it moves to the next window to extract.

Link to comment
Share on other sites

Try and do a full uninstall, that should remove the key that already exists from the previous install (old version), if a full uninstall is not one of the options then you can try and write a small script to delete the key from the registry manually.

 

That's what I was thinking I may have to do - write down each key it's asking for, then delete them before running this.  I'll give it a go.  Thank you!

Link to comment
Share on other sites

  • Moderators

Even if it is an executable, it may allow for command line switches. Many Setup.exe's are just MSI wrappers these days. Can you provide a link to the location? I googled OpenSSH, but the main page just has "Alternatives for Windows Users"

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

And on the left side of that page is a very conspicuous link called "Silent install options". Have you tried these?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

And on the left side of that page is a very conspicuous link called "Silent install options". Have you tried these?

 

Yes - and unfortunately, not working.  This is on ancient Windows XP systems (that will finally get upgraded to Windows 7 this year, but for now...).  Deleting the keys works fine since the .au3 script will be called from a batch script doing other things as well.

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

×
×
  • Create New...