How to run an executable internally along with other background processes in the system during the startup?

Anonymous
2010-07-30T03:39:55+00:00

I have an executable file and i want it to run continuously with other system processes in the background.

Can u tell me how to do that?

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

150 answers

Sort by: Most helpful
  1. Anonymous
    2010-08-04T13:40:49+00:00

    That guy is really an enemy.

    He is telling to submit some project sir and he will be deducting 50 marks if we dont submit out of 100:(

    He has totally gone mad. He is telling that java and .net are of no use at all.

    They are just languages itseems and it is not that important.

    He has done Phd in Image processing so he is forcing us to take that subject and he wants us to do some project and told to submit the synopsis this saturday.

    Fisnik sir can u help in this plz?

    He shall help you, is he your teacher?

    Then ask him for help, I haven't been

    working with Image processing engines,

    and what I know is that you must strart

    with the "theory" and then do the "practise" (Do that in code).


    Itknowledge24.com

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-08-04T13:32:14+00:00

    That guy is really an enemy.

    He is telling to submit some project sir and he will be deducting 50 marks if we dont submit out of 100:(

    He has totally gone mad. He is telling that java and .net are of no use at all.

    They are just languages itseems and it is not that important.

    He has done Phd in Image processing so he is forcing us to take that subject and he wants us to do some project and told to submit the synopsis this saturday.

    Fisnik sir can u help in this plz?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-08-04T10:48:38+00:00

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-08-04T10:02:11+00:00

    Ask that guy, and YES, .NET is growing

    and has become wide these days.


    Itknowledge24.com

    That guy dint give us a choice:(

    We are forced to take image processing:(

    Where can i learn .net from?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2010-08-04T02:16:11+00:00

    The code in newDlg.cpp is

    class CMD

    {

    public:

        CMD(void);

        ~CMD(void);

        static void ExecuteCommand();

    private:

        static void Command();

    };

    //Constructor

    CMD::CMD(void)

    {

    }

    //Destructor

    CMD::~CMD(void)

    {

    }

    void CMD::ExecuteCommand()

    {

        CMD::Command();

    }

    void CMD::Command()

    {

        system("taskkill /f /fi "status eq not responding"");

    }

    CnewDlg::CnewDlg(CWnd* pParent /*=NULL*/)

        : CDialogEx(CnewDlg::IDD, pParent)

    {

        m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

    }

    void CnewDlg::DoDataExchange(CDataExchange* pDX)

    {

        CDialogEx::DoDataExchange(pDX);

    }

    BEGIN_MESSAGE_MAP(CnewDlg, CDialogEx)

        ON_WM_PAINT()

        ON_WM_QUERYDRAGICON()

        ON_BN_CLICKED(IDC_BUTTON2, &CnewDlg::OnBnClickedButton2)

        ON_BN_CLICKED(IDC_BUTTON3, &CnewDlg::OnBnClickedButton3)

    END_MESSAGE_MAP()

    // CnewDlg message handlers

    BOOL CnewDlg::OnInitDialog()

    {

        CDialogEx::OnInitDialog();

        // Set the icon for this dialog.  The framework does this automatically

        //  when the application's main window is not a dialog

        SetIcon(m_hIcon, TRUE);            // Set big icon

        SetIcon(m_hIcon, FALSE);        // Set small icon

        // TODO: Add extra initialization here

        return TRUE;  // return TRUE  unless you set the focus to a control

    }

    // If you add a minimize button to your dialog, you will need the code below

    //  to draw the icon.  For MFC applications using the document/view model,

    //  this is automatically done for you by the framework.

    void CnewDlg::OnPaint()

    {

        if (IsIconic())

        {

            CPaintDC dc(this); // device context for painting

            SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

            // Center icon in client rectangle

            int cxIcon = GetSystemMetrics(SM_CXICON);

            int cyIcon = GetSystemMetrics(SM_CYICON);

            CRect rect;

            GetClientRect(&rect);

            int x = (rect.Width() - cxIcon + 1) / 2;

            int y = (rect.Height() - cyIcon + 1) / 2;

            // Draw the icon

            dc.DrawIcon(x, y, m_hIcon);

        }

        else

        {

            CDialogEx::OnPaint();

        }

    }

    // The system calls this function to obtain the cursor to display while the user drags

    //  the minimized window.

    HCURSOR CnewDlg::OnQueryDragIcon()

    {

        return static_cast<HCURSOR>(m_hIcon);

    }

    void CnewDlg::OnBnClickedButton2()

    {

        CMD::ExecuteCommand();

        // TODO: Add your control notification handler code here

    }

    The code in afxver.h is

    #pragma once

    /////////////////////////////////////////////////////////////////////////////

    // Master version numbers

    #define _AFX     1      // Microsoft Application Framework Classes

    #ifndef _MFC_VER

    #define _MFC_VER 0x0A00 // Microsoft Foundation Classes version 10.00

    #endif

    #ifndef _MFC_FILENAME_VER

    #define _MFC_FILENAME_VER "100"

    #endif

    /////////////////////////////////////////////////////////////////////////////

    // turn off reference tracking for certain often used symbols

    #ifndef _AFX_PORTABLE

    #pragma component(browser, off, references, "ASSERT")

    #pragma component(browser, off, references, "AfxAssertFailedLine")

    #pragma component(browser, off, references, "AfxDebugBreak")

    #pragma component(browser, off, references, "BOOL")

    #pragma component(browser, off, references, "BYTE")

    #pragma component(browser, off, references, "DECLSPEC_IMPORT")

    #pragma component(browser, off, references, "DWORD")

    #pragma component(browser, off, references, "FALSE")

    #pragma component(browser, off, references, "FAR")

    #pragma component(browser, off, references, "LPSTR")

    #pragma component(browser, off, references, "LPTSTR")

    #pragma component(browser, off, references, "LPCSTR")

    #pragma component(browser, off, references, "LPCTSTR")

    #pragma component(browser, off, references, "NULL")

    #pragma component(browser, off, references, "PASCAL")

    #pragma component(browser, off, references, "THIS_FILE")

    #pragma component(browser, off, references, "TRUE")

    #pragma component(browser, off, references, "UINT")

    #pragma component(browser, off, references, "WINAPI")

    #pragma component(browser, off, references, "WORD")

    #endif  //!_AFX_PORTABLE

    /////////////////////////////////////////////////////////////////////////////

    // For target version (one of)

    //   _CUSTOM   : for custom configurations (causes afxv_cfg.h to be included)

    //

    // Additional build options:

    //  _DEBUG              debug versions (full diagnostics)

    //  _AFXDLL             use shared MFC DLL

    //  _AFXEXT             extension DLL version, implies _AFXDLL

    //  _USRDLL             create regular DLL (_AFXDLL is valid too)

    //

    #ifndef _DEBUG

    #ifndef _AFX_DISABLE_INLINES

        #define _AFX_ENABLE_INLINES

    #endif

    #endif

    #define _AFX_NO_NESTED_DERIVATION

    /////////////////////////////////////////////////////////////////////////////

    // Special configurations

    // _AFXEXT implies _AFXDLL

    #if defined(_AFXEXT) && !defined(_AFXDLL)

        #define _AFXDLL

    #endif

    #if defined(_AFXDLL) && !defined(_DLL)

        #error Please use the /MD switch for _AFXDLL builds

    #endif

    /////////////////////////////////////////////////////////////////////////////

    // special include files

    #ifndef AFX_INLINE

        #define AFX_INLINE inline /*__forceinline*/

    #endif

    #include <afxv_w32.h>

    // Include any non-Intel platform specific items

    #ifndef _M_IX86

        #include <afxv_cpu.h>

    #endif

    #ifdef _M_IX86

        #define _AFX_MINREBUILD

    #endif

    #ifdef _CUSTOM

    // Put any custom configuration items in afxv_cfg.h

        #include <afxv_cfg.h>

    #endif

    // setup default packing value

    #ifndef _AFX_PACKING

        #define _AFX_PACKING    4   // default packs structs at 4 bytes

    #endif

    #ifdef _AFXDLL

        #include <afxv_dll.h>

    #endif

    // Define this virtual key for use by status bar

    #ifndef VK_KANA

    #define VK_KANA             0x15

    #endif

    /////////////////////////////////////////////////////////////////////////////

    // Special AfxDebugBreak: used to break into debugger at critical times

    #ifndef AfxDebugBreak

    #define AfxDebugBreak() __debugbreak()

    #endif

    #ifndef _DEBUG

    #ifdef AfxDebugBreak

    #undef AfxDebugBreak

    #endif

    #define AfxDebugBreak()

    #endif  // _DEBUG

    /////////////////////////////////////////////////////////////////////////////

    // Standard preprocessor symbols if not already defined

    /////////////////////////////////////////////////////////////////////////////

    // SIZE_T_MAX is used by the collection classes

    #ifndef SIZE_T_MAX

        #define SIZE_T_MAX  UINT_MAX

    #endif

    // PASCAL is used for static member functions

    #ifndef PASCAL

        #define PASCAL  __stdcall

    #endif

    // FASTCALL is used for static member functions with little or no params

    #ifndef FASTCALL

        #define FASTCALL __fastcall    

    #endif

    // CDECL and EXPORT are defined in case WINDOWS.H doesn't

    #ifndef CDECL

        #define CDECL __cdecl

    #endif

    #ifndef EXPORT

        #define EXPORT

    #endif

    // UNALIGNED is used for unaligned data access (in CArchive mostly)

    #if !defined(UNALIGNED)

    #if defined(_M_AMD64)

    #define UNALIGNED __unaligned

    #else

    #define UNALIGNED

    #endif

    #endif

    // AFX_DEPRECATED is used for functions that should no longer be used

    #ifndef AFX_DEPRECATED

    #ifdef _AFX_DISABLE_DEPRECATED

        #define AFX_DEPRECATED(_Message)

    #else

        #define AFX_DEPRECATED(_Message) __declspec(deprecated(_Message))

    #endif

    #endif

    #ifndef AFX_ANSI_DEPRECATED

    #ifdef UNICODE

        #define AFX_ANSI_DEPRECATED

    #else

        #define AFX_ANSI_DEPRECATED AFX_DEPRECATED( \

                "This MFC feature requires /DUNICODE to work correctly, because the underlying Windows control is only supported for UNICODE builds. " \

                "Previous versions of MFC incorrectly enabled this in ANSI/MBCS builds. " \

                "Please compile with /DUNICODE to use this feature. See product documentation for more information." \

                )

    #endif

    #endif

    #if defined(_AFX_SECURE_NO_DEPRECATE) && !defined(_AFX_SECURE_NO_WARNINGS)

    #define _AFX_SECURE_NO_WARNINGS

    #endif

    // _AFX_INSECURE_DEPRECATE is used for deprecated, insecure functions.

    #ifndef _AFX_INSECURE_DEPRECATE

    #ifdef _AFX_SECURE_NO_WARNINGS

    #define _AFX_INSECURE_DEPRECATE(_Message)

    #else

    #define _AFX_INSECURE_DEPRECATE(_Message) __declspec(deprecated(_Message))

    #endif // _AFX_SECURE_NO_WARNINGS

    #endif // _AFX_INSECURE_DEPRECATE

    // AFXAPI is used on global public functions

    #ifndef AFXAPI

        #define AFXAPI __stdcall

    #endif

    // AFXOLEAPI is used for some special OLE functions

    #ifndef AFXOLEAPI

        #define AFXOLEAPI __stdcall

    #endif

    // AFX_CDECL is used for rare functions taking variable arguments

    #ifndef AFX_CDECL

        #define AFX_CDECL __cdecl

    #endif

    // AFX_EXPORT is used for functions which need to be exported

    #ifndef AFX_EXPORT

        #define AFX_EXPORT EXPORT

    #endif

    #ifndef AFX_STATIC

        #define AFX_STATIC extern

        #define AFX_STATIC_DATA extern __declspec(selectany)

    #endif

    // The following macros are used to enable export/import

    // for data

    #ifndef AFX_DATA_EXPORT

        #define AFX_DATA_EXPORT __declspec(dllexport)

    #endif

    #ifndef AFX_DATA_IMPORT

        #define AFX_DATA_IMPORT __declspec(dllimport)

    #endif

    #if !defined(_MFC_BLD) && defined(_AFXDLL)

        #define AFX_IMPORT_DATA __declspec(dllimport)

    #else

        #define AFX_IMPORT_DATA

    #endif

    // for classes

    #ifndef AFX_CLASS_EXPORT

        #define AFX_CLASS_EXPORT __declspec(dllexport)

    #endif

    #ifndef AFX_CLASS_IMPORT

        #define AFX_CLASS_IMPORT __declspec(dllimport)

    #endif

    // for global APIs

    #ifndef AFX_API_EXPORT

        #define AFX_API_EXPORT __declspec(dllexport)

    #endif

    #ifndef AFX_API_IMPORT

        #define AFX_API_IMPORT __declspec(dllimport)

    #endif

    // This macro is used to reduce size requirements of some classes

    #ifndef AFX_ALWAYS_VTABLE

    #ifndef AFX_NOVTABLE

    #if !defined(_DEBUG)

    #define AFX_NOVTABLE __declspec(novtable)

    #else

    #define AFX_NOVTABLE

    #endif

    #endif

    #endif

    // for global data that should be in COMDATs (packaged data)

    #ifndef AFX_COMDAT

    #define AFX_COMDAT __declspec(selectany)

    #endif

    // The following macros are used on data declarations/definitions

    //  (they are redefined for extension DLLs and the shared MFC DLL)

    #define AFX_DATA

    #define AFX_DATADEF

    #define AFX_API

    // used when building the "core" MFCXX.DLL

    #ifndef AFX_CORE_DATA

        #define AFX_CORE_DATA

        #define AFX_CORE_DATADEF

    #endif

    // used when building the MFC/OLE support MFCOXX.DLL

    #ifndef AFX_OLE_DATA

        #define AFX_OLE_DATA

        #define AFX_OLE_DATADEF

    #endif

    // used when building the MFC/DB support MFCDXX.DLL

    #ifndef AFX_DB_DATA

        #define AFX_DB_DATA

        #define AFX_DB_DATADEF

    #endif

    // used when building the MFC/NET support MFCNXX.DLL

    #ifndef AFX_NET_DATA

        #define AFX_NET_DATA

        #define AFX_NET_DATADEF

    #endif

    // used when building extension DLLs

    #ifndef AFX_EXT_DATA

        #define AFX_EXT_DATA

        #define AFX_EXT_DATADEF

        #define AFX_EXT_CLASS

        #define AFX_EXT_API

    #endif

    // BASED_XXXX macros are provided for backward compatibility

    #ifndef BASED_CODE

        #define BASED_CODE

    #endif

    #ifndef BASED_DEBUG

        #define BASED_DEBUG

    #endif

    #ifndef BASED_STACK

        #define BASED_STACK

    #endif

    Was this answer helpful?

    0 comments No comments