Sign in to follow this  
Followers 0
neo42

Winexist before user login

3 posts in this topic

Hi!

I wrote a little autoit script in order to confirm windows driver signature security dialog. It works, when an user is logged on.

We use a software distribution tool "empirum", which can install software packages before user login.

My problem is, my autoit script does not work before user login by the software distribution.

The software distribution agent runs at this time with local system security.

It seems that the autoit script, winexists command can find the windows title...

While 1 = 1
    If @OSVersion = "WIN_7" Or @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_2008" Or @OSVersion = "WIN_2008R2" Then
        If WinExists("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren") Then
            ControlFocus("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren", "[CLASS:Button; INSTANCE:2]")
            ControlCommand("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren", "[CLASS:Button; INSTANCE:2]", "Check", "")
        EndIf
        If WinExists("Windows Security", "&Install this driver software anyway") Then
            ControlFocus("Windows Security", "&Install this driver software anyway", "[CLASS:Button; INSTANCE:2]")
            ControlCommand("Windows Security", "&Install this driver software anyway", "[CLASS:Button; INSTANCE:2]", "Check", "")
        EndIf
    EndIf
    If @OSVersion = "WIN_XP" Or @OSVersion = "WIN_2003" Or @OSVersion = "WIN_2000" Then
        If WinExists("Hardwareinstallation") Then
            ControlFocus("Hardwareinstallation", "Installation &fortsetzen", "[CLASS:Button; INSTANCE:1]")
            ControlCommand("Hardwareinstallation", "Installation &fortsetzen", "[CLASS:Button; INSTANCE:1]", "Check", "")
        EndIf
        If WinExists("Hardware Installation") Then
            ControlFocus("Hardware Installation", "&Continue Anyway", "[CLASS:Button; INSTANCE:1]")
            ControlCommand("Hardware Installation", "&Continue Anyway", "[CLASS:Button; INSTANCE:1]", "Check", "")
        EndIf
    EndIf
    Sleep(250)
WEnd

Has anyone an idea? Thank in advance!

Share this post


Link to post
Share on other sites



Hi!

I wrote a little autoit script in order to confirm the windows driver signature security dialog. It works, when an user is logged on.

We use a software distribution tool "empirum", which can install software packages before user login.

My problem is, my autoit script does not work before user login by the software distribution.

The software distribution agent runs at this time with local system security.

It seems that the autoit script command "winexists" can not find the windows title and text...

While 1 = 1
    If @OSVersion = "WIN_7" Or @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_2008" Or @OSVersion = "WIN_2008R2" Then
        If WinExists("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren") Then
            ControlFocus("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren", "[CLASS:Button; INSTANCE:2]")
            ControlCommand("Windows-Sicherheit", "Diese Treibersoftware trotzdem &installieren", "[CLASS:Button; INSTANCE:2]", "Check", "")
        EndIf
        If WinExists("Windows Security", "&Install this driver software anyway") Then
            ControlFocus("Windows Security", "&Install this driver software anyway", "[CLASS:Button; INSTANCE:2]")
            ControlCommand("Windows Security", "&Install this driver software anyway", "[CLASS:Button; INSTANCE:2]", "Check", "")
        EndIf
    EndIf
    If @OSVersion = "WIN_XP" Or @OSVersion = "WIN_2003" Or @OSVersion = "WIN_2000" Then
        If WinExists("Hardwareinstallation") Then
            ControlFocus("Hardwareinstallation", "Installation &fortsetzen", "[CLASS:Button; INSTANCE:1]")
            ControlCommand("Hardwareinstallation", "Installation &fortsetzen", "[CLASS:Button; INSTANCE:1]", "Check", "")
        EndIf
        If WinExists("Hardware Installation") Then
            ControlFocus("Hardware Installation", "&Continue Anyway", "[CLASS:Button; INSTANCE:1]")
            ControlCommand("Hardware Installation", "&Continue Anyway", "[CLASS:Button; INSTANCE:1]", "Check", "")
        EndIf
    EndIf
    Sleep(250)
WEnd

Has anyone an idea? Thank in advance!

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