Esempio n. 1
0
 protected virtual void OnCommandReceived(ExecuteCommandEventArgs e)
 {
     if (CommandReceived != null)
     {
         CommandReceived(this, e);
     }
 }
Esempio n. 2
0
 protected virtual void OnExecuteCommand(ExecuteCommandEventArgs e)
 {
     if (ExecuteCommand != null)
     {
         ExecuteCommand(this, e);
     }
 }
Esempio n. 3
0
        private void SocketListener_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            LogHelper.Log("SocketListener_ExecuteCommand::" + e.Command);

            if (CommandReceived != null)
            {
                CommandReceived(this, e);
            }
        }
Esempio n. 4
0
        private void Server_CommandReceived(object sender, ExecuteCommandEventArgs e)
        {
            LogHelper.Log("Server_CommandReceived::" + e.Command);


            // windows service runs in isolation and cannot normally execute batch scripts or executables in the session of logged in user.
            // so the below ApplicationLoader class will identify the current user using winlogon and then execute programs in that session.

            LogHelper.Log("Starting process from windows service...");
            ApplicationLoader.PROCESS_INFORMATION procInfo;
            ApplicationLoader.StartProcessAndBypassUAC(e.Command, out procInfo);
        }