Sign in to follow this  
Followers 0
supraspecies

Intercept a command?

7 posts in this topic

Making a silent install for a program, but there is one thing installer does after it finishes: opens developer's homepage. CMD window is being called up when that happens. I'm wondering if I can somehow intercept that command so program wouldn't open its homepage at the end of the installation.

If I can't interpt command/CMD window, then maybe there is a way to close default browser in case it is being called up or something.

Share this post


Link to post
Share on other sites



If it brings up an IE window you could do something like this:

#include <IE.au3>

Opt("WinTitleMatchMode")

While 1
    closeWin()
    Sleep(100)
WEnd

Func closeWin()
    Local $oIE = _IEAttach("Internet Explorer", "windowtitle")
    If @error = 0 Then
        _IEQuit($oIE)
        Exit
    EndIf
EndFunc   ;==>closeWin

You could also probably use the:

WinClose()
WinKill()

functions as well.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

If you close the browser, in will close all tabs. The user will be happy :

 

Agreed, but depends on the environment that this is being installed in.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Installing File Renamer Turbo from Kristanix. There is an /S switch, yes, but I don't want the program to be installed into default folder. So I'm running through setup dialogs with AutoIT and inserting my own path. If there are any other switches for silent/unattended install, I didn't see them being documented anywhere.

Solution with killing the window is very familiar to me, but as the program launches default browser (which can be anything), matching window title isn't easy. I was thinking along the lines of somehow intercepting or blocking the command that installer sends (supposedly just site address?). But so far I'm guessing there is no easy way around this.

Edited by supraspecies

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

File Renamer Turbo installer seems to use NSIS.

So you can easily set the destination directory with /D=<Destination> :

RunWait("filerenamerturbo-setup.exe /S /D=c:\apps\FileRenamerTurbo") ; replace it by your path
Edited by jguinch

Share this post


Link to post
Share on other sites

Oh, thanks a lot!

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