Tralveller

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 ****
#AutoIt3Wrapper_Icon=C:\temp\favicon.ico
#AutoIt3Wrapper_Outfile=C:\temp\User_Wait_Message_x32.exe
#AutoIt3Wrapper_Outfile_x64=C:\temp\User_Wait_Message_x64.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Info_Encryption()

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]]
    GUISetAccelerators($aAcc)

    GUISetState() ; Zeigt eine leere Dialogbox an

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


    Do
        Until GUIGetMsg() = $cDummy
            Exit



    ;GUI starten, bis der Dialog beendet wird
    ;Ohne verhindern von Schließen via ALT + F4 bzw. STRG + PAUSE
    ;Do
    ;    $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

Tralveller

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