Jump to content

Open App And Enter Login Works Manually But Not After Reboot - (Moved)


Recommended Posts

Hi all.

I'm using Task Scheduler to restart my computer at, for example, 12:00am, and then also to run an AutoIt script at 12:05am. The script works when I just run it by manually running the script, and it also works if I run it by manually selecting "Run" from Task Scheduler, but when it runs following the system reboot it does not work. Following the system reboot, the application runs and then the Windows Explorer box (what opens when the Windows key is pressed) opens, and no text is entered anywhere. Can someone help me understand why this is the case and suggest how I can get around it?


; Set username and password for autologin here
Local $username = "myUser"
Local $password = "myPass"

; Set app login window ID from AutoIt
; Open Au3Info and go to Window Info -> Window -> Class. Copy/paste the window class and place between "[CLASS:]"
Local $appWindowID = "[CLASS:WindowsForms10.Window.8.app.0.1d2098a_r7_ad1]"

; Set 'target' property in app shortcut properties here
Local $appPath = "C:\app.exe"


; Wait 2 seconds before running script

; Open app

; Get app login window once it opens
$window = WinWaitActive($appWindowID)

; Wait 5 seconds for window to load, then activate it

; Click on username field
MouseClick("left", 956, 560)

; Select all and delete

; Enter in username

; TAB to password box

; Enter in password

; Press "ENTER" to log in


Link to comment
Share on other sites

  • Moderators

Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states:


General development and scripting discussions.

Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Link to comment
Share on other sites

Try adding a GUI to the program.
You will find that after Windows starting the GUI it doesn't show up, although you can see your program already running in the TaskManager.
But if you pay attention, it will be run under the system user account, so there is no interaction with the current user's Desktop.


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

  • Recently Browsing   0 members

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