Jump to content

hidden installer


 Share

Recommended Posts

Hi guys,

I am trying to install a small application(pdf printer). All works fine with a visible install. I tried to make it hidden.

Here is the code:

Run(@ScriptDir & "\pdfprinter2009.exe", "", @SW_HIDE)
WinWaitActive("PDF PRINTER 2009 Installer Setup","Welcome to the PDF PRINTER")
ControlClick("PDF PRINTER 2009 Installer Setup", "Welcome to the PDF PRINTER 2009 Installer Setup", "[ID:1; TEXT:&Next >]")

etc etc

Nothing happens... i can not get a click to the hidden window

Next i tried this one:

Run(@ScriptDir & "\pdfprinter2009.exe", "", @SW_HIDE)
Sleep(5000)
If WinExists("[TITLE:PDF PRINTER 2009 Installer Setup]","") Then
    MsgBox(0, "", "Window exists")
EndIf

I get a window exists, but only if i add that sleep(i haveno idea why i have to add that). Anyway the script still does not work.

I tried more combination with WinWait or WinWaitActive ..

I suppose that i am doing something wrong, that is why i am asking if anyone has done this before to tell me what is the LOGIC behind and what should i wait for (window, process active window, winExists....etc)

Thanks in advance

Link to comment
Share on other sites

I get a window exists, but only if i add that sleep...

and it's not strange, by default script doesn't wait until window will be shown

WinWait

--------------------------------------------------------------------------------

Pauses execution of the script until the requested window exists.

=====

try this:

Run(@ScriptDir & "\pdfprinter2009.exe", "", @SW_HIDE)
While 1
    Sleep(100)
  If WinExists("[TITLE:PDF PRINTER 2009 Installer Setup]","") Then
    ExitLoop
  EndIf
Wend
ControlSend("PDF PRINTER 2009 Installer Setup", "Welcome to the PDF PRINTER 2009 Installer Setup", "[ID:1; TEXT:&Next >]", "{ENTER}")

_____________________________________________________________________________

Link to comment
Share on other sites

and it's not strange, by default script doesn't wait until window will be shown

WinWait

--------------------------------------------------------------------------------

Pauses execution of the script until the requested window exists.

=====

try this:

Run(@ScriptDir & "\pdfprinter2009.exe", "", @SW_HIDE)
While 1
    Sleep(100)
  If WinExists("[TITLE:PDF PRINTER 2009 Installer Setup]","") Then
    ExitLoop
  EndIf
Wend
ControlSend("PDF PRINTER 2009 Installer Setup", "Welcome to the PDF PRINTER 2009 Installer Setup", "[ID:1; TEXT:&Next >]", "{ENTER}")

Thank you very much for your response.

I did exactly what you did. After the ControlSend procedure the window gets visible, it looses the HIDE property. I added a

WinSetState ( "PDF PRINTER 2009", "", @SW_HIDE )

after the ControlSend, BUT i can still see a flicker of that window. Is it possible to make an installer fully invisible?

Thanks in advance

Mike

Link to comment
Share on other sites

I think that it's probably showing up again because the installing is deleting that window and making a new one, as just part of the normal installation setup. I've seen installs that use a new window for every other page it seems like. So the resetting would mess it up, and I don't know of a way that you could fix that...

We ought not to misbehave, but we should look as though we could.

Link to comment
Share on other sites

I think that it's probably showing up again because the installing is deleting that window and making a new one, as just part of the normal installation setup. I've seen installs that use a new window for every other page it seems like. So the resetting would mess it up, and I don't know of a way that you could fix that...

Thanks for the reply - at least i know what goes wrong.... well.. flickering it is then :D

Link to comment
Share on other sites

if it's still visible on taskbar, add(once) :

WinSetTrans("PDF PRINTER 2009 Installer Setup", "", 0)

instead of using @SW_HIDE after each ControlSend

Hi,

Thanks for your reply. The window is not shown on the taskbar is shown as a desktop application window. Although it starts hidden after first click (second window) becomes visible.

i suppose it can not be done.. because of the way installer is

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...