Jump to content

AutoIt EXE at system startup


Recommended Posts

Hi All, I have Altiris controlling a software install at system startup. I have to display a "splash screen" to any user who might logon detailing what is happening and that the computer will auto restart. The "brains" of the install is a vbscript and it calls "splash screen", which is an HTA, using the 'shell.run' command.

The issue is that the install has several windows popup in front of the HTA and I want the HTA to stay on top. The 'onblur' function does not work well in HTAs sooooo I created the below AutoIt code to grab the window and set the AlwaysOnTop flag and the vbscript is calling the AutoIt.exe instead of the HTA.

It WORKS when I double click the EXE, when the VBS runs the EXE, when I use the 'AT' command at the command prompt and have the EXE run as the SYSTEM Account.

It DOES NOT WORK when the EXE is run before a user logon or when I create a Scheduled Task through the Control Panel, I see the EXE appear in Task Manager but it does not star the HTA.

Is there something I should add to the code to allow it to run before a user logon? NOTE: HTA will run before a user logon but will not be visible until the user logs on.

<code>

Run("GEStatus.exe")

Sleep(2000)

$win_title = "Install Status"

WinActivate($win_title, "")

WinSetOnTop($win_title, "", 1)

Exit

</code>

Link to comment
Share on other sites

I fixed my problem. I should have followed my KISS philysophy, Keep It Simple Stupid :mellow: . I made the vbscript run the HTA and run the AutoIT.exe. I coded the AutoIt.EXE with a Do Until WinActivate loop. then it just sat down in the taskbar until it detected the HTA handle and then set the Top Most Flag. I really like AutoIT!!

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