Jump to content

SOLVED:Running an installer with a wildcard


Recommended Posts

3 minutes ago, Earthshine said:

Hey, @CodingMonkey81, can you put SOLVED in the title of your thread so other users know it's solved and how to solve it should they have the same issue. The day you posted this, I had helped someone UN install msi apps in the same manner.

I added a tag that it was solved but I don't know how to edit the title of this thread.

Edited by CodingMonkey81
Link to comment
Share on other sites

edit 1st post...

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

20 minutes ago, Earthshine said:

Hey, @CodingMonkey81, can you put SOLVED in the title of your thread so other users know it's solved and how to solve it should they have the same issue. The day you posted this, I had helped someone UN install msi apps in the same manner.

Quick question, slightly related (and if it needs a new topic I'll start one); after the installer comes up I'm trying to move it to the next screen without any luck:

 

#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
Local $aArray = _FileListToArray("D:\Path\To\File", 'StaticFileName*.msi', Default, True)
_ArraySort($aArray, 1) ; sorts descending, latest version on top at element 0
;_ArrayDisplay ($aArray)

Local $str = "msiexec /i """ & $aArray[0] & """"
ConsoleWrite($str)
RunWait($str)
Sleep(5000)
WinWaitActive("Window Title", "Window Text", 0)
Send("!N")

 

I put the sleep command in because just jumping right to the WinWaitActive wasn't working.

If I manually run the msi file and then issue the last two commands (in it's own file) they function properly. Is there something more I need to do (because of the scripting before it)?

Edited by CodingMonkey81
Link to comment
Share on other sites

you are not waiting for the right windows.

you need to supply the title of that MSI installer and the text on the title bar. your WaitWinActive needs to change

WaitWinActive ("[CLASS:#32770]", "Some MSI Setup Title")

Your installer's class is usually a windows dialog is [CLASS:#32770] and that is what

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

9 minutes ago, Earthshine said:

you are not waiting for the right windows.

you need to supply the title of that MSI installer and the text on the title bar. and then send ALT N

Send("{ALT}n"}

 

something like that

When I use the AutoIt Windows Info it shows me the Title Value (which I'm using) and the visible text (which I'm also using). 

 

If I create a new AutoIt file and run the last two commands they run successfully once the window is in focus (when I run the msi manually). If I then put that at the end of the full script (above) it doesn't run at all. I've used the WinWaitActive in the past and I'm a little rusty but this command I do have some experience with :)

Thanks!

 

Edit: I see the issue with where you think I'm going wrong. I've sanitized the Window Title and Window text as to not reveal the application and to protect the company I work for. I can tell you that I do have the Window Title and Window Text correct in the code with information from the AutoIt Windows Info utility.

Edited by CodingMonkey81
Clarification as to Window Title/Text info
Link to comment
Share on other sites

10 minutes ago, Earthshine said:

you are not waiting for the right windows.

you need to supply the title of that MSI installer and the text on the title bar. your WaitWinActive needs to change

WaitWinActive ("[CLASS:#32770]", "Some MSI Setup Title")

Your installer's class is usually a windows dialog is [CLASS:#32770] and that is what

so set the text correctly for your installer too and that should work, then your send should work but I have a better way....

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

2 minutes ago, Earthshine said:

so set the text correctly for your installer too and that should work, then your send should work but I have a better way....

I've got the right info in; I sanatized the info in the above script to protect the application I'm installing.

I've not had to use the installer's class in the past when using WinWaitActive but just the windows and text from the installer dialog box; is this a new requirement?

 

I guess where I'm confused is that if I manually run the msi file and then issue the WinWaitActive command (with the correct window information) it works and advances to the next window. If I then take that same code and put if after the autoit code that runs the msi file it doesn't work. I've no idea why it would work on it's own but not after additional code. 

Link to comment
Share on other sites

Experiment with

Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

I'd try to leave the text part out of it, leave only the title, try with handle, with class, and the opt variations.

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

16 minutes ago, careca said:

I'd try to leave the text part out of it, leave only the title, try with handle, with class, and the opt variations.

 

FIgured it out!

Instead of using "RunWait($str)" I used "Run($str)". As I recall, RunWait waits for the program called by AutoIT to terminate before sending additional commands.

Edited by CodingMonkey81
Link to comment
Share on other sites

 Excellent I knew you could do it!!

Also yes, I use run wait because we were doing a quiet before

 

You have just experienced, firsthand, code development in an iterative cycle. This is how you do it. Script and test it script it and test it

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Damn how could i miss that wait? Sometimes it's the most In-your-face stuff that gets you.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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...