GUI compiled application will not shown when started as "Scheduled task" with SYSTEM account

2 posts in this topic

Hello at all,


I try to start a compiled GUI application during an installation that runs as local "SYSTEM" account.

On normal use it works and the GUI comes up.

Then I'm creating in Scheduled tasks a new task which runs as "NT SYSTEM" account, the applications starts, but no GUI will shown on current logged on user.

Here an example of my code:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


Func Info_Encryption()
    Local $widthCell, $msg, $iOldOpt

    GUICreate("Test...", 655, 475, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU), $WS_EX_TOPMOST) ; alternativ zu $WS_CAPTION auch $WS_MINIMIZEBOX

    SoundPlay(@WindowsDir & "\media\Windows Balloon.wav", 1)

    $iOldOpt = Opt("GUICoordMode", 2)

    $widthCell = 800 ; GUICtrlCreateLabel maximale Länge vom textfeld
    $font = "Verdana" ; Schriftart definiert
    GUISetFont(12, 800, $font) ; Schrift-Größe, Dicke und Art aktiviert
    GUICtrlCreateLabel("Test1", 20, 20, $widthCell)
    GUICtrlCreateLabel("''Test2''.", -1, 0, $widthCell)
    GUICtrlCreateLabel("Test3", -1, 0, $widthCell)
    GUICtrlCreateLabel("Test4", -1, 0, $widthCell)

    $cDummy = GUICtrlCreateDummy()
    Local $aAcc[1][2] = [["^{NUMPADMULT}", $cDummy]]

    GUISetState() ; Zeigt eine leere Dialogbox an

    TraySetToolTip ("Test...")
    TrayTip ("Line 1", "Line 2", 15, 1)
    AutoItSetOption ("TrayMenuMode", 1)

        Until GUIGetMsg() = $cDummy

    ;GUI starten, bis der Dialog beendet wird
    ;Ohne verhindern von Schließen via ALT + F4 bzw. STRG + PAUSE
    ;    $msg = GUIGetMsg()
    ;Until $msg = $GUI_EVENT_CLOSE

    $iOldOpt = Opt("GUICoordMode", $iOldOpt)
EndFunc   ;==>Example


How can I show the GUI by using Windows SYSTEM account?


Thanks a lot

Kind regards


Share this post

Link to post
Share on other sites

can't, the SYSTEM account does not have access to the desktop.  if you want to see it, it has to be launched as the user.


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