5 Replies Latest reply on Aug 26, 2017 3:38 AM by Hayton

    EEDK 9.6.0- Runs, but nothing happens. Correct path set.



      I have a AutoHotKey compiled executable I am trying to make into a package. It does not appear I can run use the executable name in the command to run line. So, I have created a batch file to launch it. Of course, manually it works (although it briefly flashes the black box).

      I believe I have the relative path correct. This is about hour 5 of working on this, so I would really appreciate a hand from someone.


      Here is the launch file I am using "Launch.bat"


      @echo off

        :: Set path to current product folder

      pushd "%~dp0"

      :: Get software package source directory and set as variable SRCDIR


      for /f "delims=" %%a in ('cd') do @set SRCDIR=%%a

      %comspec% /c start "" /min "%SRCDIR%\rebootnag14d15m.exe" ^& exit


      The package is executed on the station, as a deployment, and finishes... but as I said nothing happens.

      The content of the exe is below at the bottom of the page...

      I have attached a copy of the agent monitor output on the client station, and pasted the MASVC log below:


      2017-08-22 20:29:45.234 masvc(2696.3316) ioservice.Info: IO service received the message.

      2017-08-22 20:29:45.239 masvc(2696.3316) ioservice.Info: IO service received the message.

      2017-08-22 20:29:45.276 masvc(2696.3316) runnow.Info: DC task received from epo <MA_RunNow>.

      2017-08-22 20:29:45.276 masvc(2696.3316) runnow.Info: dc task name:RebootNag owner:EPOAGENT3000 type:Deployment task_id:MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e} creator:EPOSERVER_RUNNOW

      2017-08-22 20:29:45.277 masvc(2696.3316) runnow.Info: Parse the dc task MA_RunNow xml.

      2017-08-22 20:29:45.313 masvc(2696.3316) scheduler.Info: Next time(local) of task RebootNag: 2017-08-22 20:29:48

      2017-08-22 20:29:45.339 masvc(2696.3316) runnow.Info: Scheduled the dc task <MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e}> name <RebootNag> rc = <0>

      2017-08-22 20:29:45.339 masvc(2696.3316) runnow.Info: Scheduled the task for the dc message <MA_RunNow>.

      2017-08-22 20:29:45.340 masvc(2696.3316) DataChannelHandler.Info: Received epo.datachannel.msgbus.request.type.msgupload from client : EPOAGENT3000

      2017-08-22 20:29:45.363 masvc(2696.3316) ahclient.Info: Scheduling spipe connection with "immediate" priority.

      2017-08-22 20:29:45.363 masvc(2696.3316) DataChannel.Manager.Info: A { MsgUpload } spipe alert has been raised successfully in ah_client.

      2017-08-22 20:29:45.363 masvc(2696.3316) ahclient.Info: Start processing spipe connection request.

      2017-08-22 20:29:45.387 masvc(2696.3316) DataChannel.Manager.Info: DataChannel Service decorating SPIPE package for : { MsgUpload }

      2017-08-22 20:29:45.389 masvc(2696.3316) DataChannel.Manager.Info: Sending the next batch of 1 data channel items

      2017-08-22 20:29:45.415 masvc(2696.3316) ahclient.Info: Agent communication session started

      2017-08-22 20:29:45.437 masvc(2696.3316) ahclient.Info: Agent is connecting to ePO server

      2017-08-22 20:29:45.457 masvc(2696.3316) ahclient.Info: Initiating spipe connection to site{b57ed8e1-7ffb-4d94-9ca6-ef83217cbabe}&Source=Agent_3.0.0&TenantId=833A94BB-8B6C -44DF-BB58-4B1166BC08DC.

      2017-08-22 20:29:45.465 masvc(2696.3316) ahclient.Info: connection initiated to site{b57ed8e1-7ffb-4d94-9ca6-ef83217cbabe}&Source=Agent_3.0.0&TenantId=833A94BB-8B6C -44DF-BB58-4B1166BC08DC.

      2017-08-22 20:29:45.573 masvc(2696.3316) ahclient.Info: Network library rc = <1008>, Agent handler reports response code <202>.

      2017-08-22 20:29:45.573 masvc(2696.3316) ahclient.Info: Agent handler doesn't have anything to send. response code 202.

      2017-08-22 20:29:45.574 masvc(2696.3316) ahclient.Info: Spipe connection response received, network return code = 1008, response code 202.

      2017-08-22 20:29:45.575 masvc(2696.3316) DataChannel.Manager.Info: Package uploaded to ePO Server successfully

      2017-08-22 20:29:45.618 masvc(2696.3316) ahclient.Info: Agent communication session closed

      2017-08-22 20:29:45.638 masvc(2696.3316) ioservice.Info: IO service received the message.

      2017-08-22 20:29:45.644 masvc(2696.3316) ioservice.Info: IO service received the message.

      2017-08-22 20:29:48.269 masvc(2696.3316) scheduler.Info: Scheduler: Invoking task [RebootNag]...

      2017-08-22 20:29:48.289 masvc(2696.3316) scheduler.Info: The task RebootNag becomes active

      2017-08-22 20:29:48.311 masvc(2696.3316) Updater.Info: Received updater request initiator_type=4 request_type=0 taskid=MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e}.

      2017-08-22 20:29:48.311 masvc(2696.3316) Updater.Info: Creating run now updater request, task id = MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e}.

      2017-08-22 20:29:48.311 masvc(2696.3316) Updater.Info: Adding the updater request taskid <MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e}> in the queue.

      2017-08-22 20:29:48.326 masvc(2696.3316) Updater.Info: Invoking mue as, [C:\Program Files\McAfee\Agent\x86\McScript_InUse.exe -script C:\ProgramData\McAfee\Agent\update\InstallMain.McS -id 32533 -localeid 0409 -logfile C:\ProgramData\McAfee\Agent\logs\McScript -parent FRAMEWORK -initiator 4 -installdir C:\Program Files\McAfee\Agent\\x86\ -taskid MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e} (null) ].

      2017-08-22 20:29:48.352 masvc(2696.3316) Updater.Info: Updater engine is spawned successfully.

      2017-08-22 20:29:48.352 masvc(2696.3316) Updater.Info: Creating mue event handler.

      2017-08-22 20:29:48.352 masvc(2696.3316) Updater.Info: Created mue event handler.

      2017-08-22 20:29:48.353 masvc(2696.3316) Updater.Info: Launched updater engine successfully.

      2017-08-22 20:29:48.353 masvc(2696.3316) Updater.Info: Updater session started for initiator type=4, task id = <MA_RunNow_295_{29b8a040-879a-11e7-3630-f7194f6a7d9e}>.

      2017-08-22 20:29:48.354 masvc(2696.3316) DataChannelHandler.Info: Received epo.datachannel.msgbus.request.type.msgupload from client : EPOAGENT3000


      Just for reference, this is the content of the executable pre-compliled executable I called "RebootNag14d15m.exe:


      #Warn,UseUnsetLocal ; warning on uninitialized variables

      #NoTrayIcon ; do not show an icon in the system tray

      #NoEnv ; avoid checking empty variables to see if they are environment variables

      #SingleInstance ignore ; leave old instance running

      SetBatchLines,-1 ; run at maximum speed







      ;MsgBox,,Uptime Tests,BuiltInTC=%BuiltInTC%`nGetTC=%GetTC%`ntimeGT=%timeGT%`nGetTC64=%GetTC64%



      T = 20000101000000

      T += GetTC64/1000,Seconds

      FormatTime FormdT, %T%, HH:mm:ss

      FormatTime Days, %T%, YDay



      ; begin params you may want to change



      ; end params you may want to change



      NagTime:=1000*60*NagTimeMinutes ; param to Sleep is in milliseconds




      If (UptimeDays>UptimeDaysLimit)


        MsgBox,4401,This Vidant Health Computer Needs a Break!, This system has been up for %UptimeDays% days`n`nClose your open programs, then click OK to reboot`n-----or -----`nHit cancel, or Enter to be reminded again in %NagTimeMinutes% minutes.`n`n`nThanks, Vidant Health Information Services










        • 1. Re: EEDK 9.6.0- Runs, but nothing happens. Correct path set.

          it appears that your bat file is running the exe and then exiting, I do not believe it is waiting.. so it appears to McAfee Agent see that it was successful (exit code 0)


          If you look on the clients do you see the rebootnag14d15m.exe running in task manager?


          McAfee Agent is running under the SYSTEM account and anything it runs will run as the SYSTEM.. So your app is running, but as system. So the user is never seeing the prompt and your app is siting in a wait state.


          You would need to impersonate the user -- even then it still may not display.. Windows has controls in place to prevent SYSTEM from interacting with the desktop..

          • 2. Re: EEDK 9.6.0- Runs, but nothing happens. Correct path set.

            It never runs in the task manager. I have watched as well as recorded it.

            Wow, that sucks. Certainly begs the question of how McAfee is able to do it, huh? EPO is able to run applications that prompt users to reboot, etc.

            • 3. Re: EEDK 9.6.0- Runs, but nothing happens. Correct path set.

              Did you look at all process, I used your bat file and create a package and it did work work


              what you could do use task scheduler

              so your in you "RebootNag14d15m.exe: instead of calling msgbox


              pseudo autoit code:


              if stringinstr($cmdlineraw, "TASK") then

              your code



              ;start the process under local user

              ; you may want to move it to somewhere (ie windows dir), if do adjust the /TR below

                   $hour = @hour

                   $hou415 = @hour

                   $min = @min +2

                   $min15 = @min + 15

                   if $min >60 then

                          $hour = $hour + 1

                           $hour15 = $hour

                           $min = 2

                          $min15 = 2+15


                   if $min15 >60 then

                        $hour15 = $hour15 +1

                        $min15 = 15


              ; the idea is you need start about 2 from the current time and an end at least 10 out..


                   Run('schtasks.exe /create /sc DAILY /TN test123 /TR ' & @ScriptFullPath & ' TASK /ST ' & $hour & ':' $min &' /ET ' & $hour15 &':' & $min15 & ' /K')

                   ; this creates the tasks

                   ;wait for it to run


                   ;delete the task

                   ; you can add code to make sure it is running here if you want

                   run( 'schtasks.exe /delete /f /tn test123 ')





              here is copy and paste of the schtask command in case I mess it up

              schtasks /create /sc DAILY /TN test123 /TR x:\AutoIt\rebootnag14d15m.exe.exe /ST 07:26 /ET 07:51 /K

              • 4. Re: EEDK 9.6.0- Runs, but nothing happens. Correct path set.

                You're a God. I owe you a beer at Focus my friend!