Tralveller Posted October 11, 2017 Share Posted October 11, 2017 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: expandcollapse popup#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 Link to comment Share on other sites More sharing options...
BigDaddyO Posted October 13, 2017 Share Posted October 13, 2017 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. Tralveller 1 Link to comment Share on other sites More sharing options...
Zedna Posted January 19, 2018 Share Posted January 19, 2018 (edited) Also look at this Wiki FAQ, partially related to this ... https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F Edited January 19, 2018 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Tralveller Posted November 30, 2018 Author Share Posted November 30, 2018 Hello, Thanks at all for feedback. Sorry for late reply.@BigDaddyO Yes, that's correct. I resolved that problem by importing and starting a Scheduled Task and defined as user "predefined\Users", after that I delete directly the task => the message box still running. If a User is logged on, it is also member of this group and in facts the user gets the message box. And if no one is logged on I don't care about that Group ID of "predefined\Users" is: S-1-5-32-545 More information about groups:https://support.microsoft.com/en-gb/help/243330/well-known-security-identifiers-in-windows-operating-systems A Sample of a scheduled Task I've attached. Import/Create task: SCHTASKS /CREATE /XML Scheduled_Task_Config.xml /TN "GUI_Application.exe" 2>&1 Start task: SCHTASKS /RUN /TN "GUI_Application.exe" 2>&1 Wait 5 seconds: PING 127.0.0.1 -n 6 >NUL 2>NUL Delete task: SCHTASKS /DELETE /TN "GUI_Application.exe" 2>&1 If GUI Application is not required any more (e.g. installation finished), simply kill the application with all its sub-processes. TASKKILL /IM "GUI_Application.exe" /T /F 2>&1 Maybe this is helpful for one or other Kind regards Tralveller Scheduled_Task_Config.xml Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now