Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Commad Line App

Commad Line App

Scheduled Pinned Locked Moved C / C++ / MFC
questiondesign
14 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Vijjuuu

    Creating window in Invisible mode can achieve this .

    A Offline
    A Offline
    Ajay L D
    wrote on last edited by
    #3

    Hi, Any idea how I could do this in a command line application? Thank you, AJ

    R R 3 Replies Last reply
    0
    • A Ajay L D

      Hi All, I want to write an application that runs in the background and does not bring up any kind of UI (Not even the command prompt). How can I achieve this? Thank you, AJ

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #4

      Create a "Win32 Application" project.

      nave [OpenedFileFinder]

      1 Reply Last reply
      0
      • A Ajay L D

        Hi, Any idea how I could do this in a command line application? Thank you, AJ

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #5

        What is the purpose of having an invisible window? What is it going to do? Why should it only be a command line application?

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        1 Reply Last reply
        0
        • A Ajay L D

          Hi, Any idea how I could do this in a command line application? Thank you, AJ

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #6

          try the following,

          #ifdef _UNICODE
          #pragma comment (linker, "/subsystem:windows /entry:wmainCRTStartup")
          #else //_UNICODE
          #pragma comment (linker, "/subsystem:windows /entry:mainCRTStartup")
          #endif //_UNICODE

          it makes your application as windows application and since you are not creating any windows in console application (normally not) no UI is visible. you can also think about windows NT services.

          R 1 Reply Last reply
          0
          • A Ajay L D

            Hi, Any idea how I could do this in a command line application? Thank you, AJ

            R Offline
            R Offline
            Rajkumar R
            wrote on last edited by
            #7

            You can also hide the console window,

            ShowWindow(GetConsoleWindow(), SW_HIDE);

            R 1 Reply Last reply
            0
            • R Rajkumar R

              You can also hide the console window,

              ShowWindow(GetConsoleWindow(), SW_HIDE);

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #8

              I don't understand why your previous post was voted down. I can only think that someone thinks the OP is trying to do a malicious program, for which you're providing him some assistance and so they voted you down. Anyways, I know that you won't assist someone to do a malicious program and so I'll try to bring up the score.

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              R 1 Reply Last reply
              0
              • R Rajkumar R

                try the following,

                #ifdef _UNICODE
                #pragma comment (linker, "/subsystem:windows /entry:wmainCRTStartup")
                #else //_UNICODE
                #pragma comment (linker, "/subsystem:windows /entry:mainCRTStartup")
                #endif //_UNICODE

                it makes your application as windows application and since you are not creating any windows in console application (normally not) no UI is visible. you can also think about windows NT services.

                R Offline
                R Offline
                Rajkumar R
                wrote on last edited by
                #9

                I was saying easy way to switch to "Win32 application" from a console application. Sorry if some thing wrong, But i would like to know the technical reason (will be appreciated) that gave me vote 1.

                1 Reply Last reply
                0
                • A Ajay L D

                  Hi All, I want to write an application that runs in the background and does not bring up any kind of UI (Not even the command prompt). How can I achieve this? Thank you, AJ

                  _ Offline
                  _ Offline
                  _AnsHUMAN_
                  wrote on last edited by
                  #10

                  Are you looking for a windows service

                  Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                  1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    I don't understand why your previous post was voted down. I can only think that someone thinks the OP is trying to do a malicious program, for which you're providing him some assistance and so they voted you down. Anyways, I know that you won't assist someone to do a malicious program and so I'll try to bring up the score.

                    Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                    R Offline
                    R Offline
                    Rajkumar R
                    wrote on last edited by
                    #11

                    Thank buddy, Invisible app can be easily created in windows subsystem application, even a beginner (win32) can understand. So nothing prevents he from creating malicious program. He can have good intention also.

                    R 2 Replies Last reply
                    0
                    • R Rajkumar R

                      Thank buddy, Invisible app can be easily created in windows subsystem application, even a beginner (win32) can understand. So nothing prevents he from creating malicious program. He can have good intention also.

                      R Offline
                      R Offline
                      Rajesh R Subramanian
                      wrote on last edited by
                      #12

                      Well, that was only my guess. Besides that, I couldn't think of a reason why someone down-voted you. :)

                      Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                      1 Reply Last reply
                      0
                      • R Rajkumar R

                        Thank buddy, Invisible app can be easily created in windows subsystem application, even a beginner (win32) can understand. So nothing prevents he from creating malicious program. He can have good intention also.

                        R Offline
                        R Offline
                        Rajesh R Subramanian
                        wrote on last edited by
                        #13

                        Unjustified[^] vote here. :|

                        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                        R 1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          Unjustified[^] vote here. :|

                          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                          R Offline
                          R Offline
                          Rajkumar R
                          wrote on last edited by
                          #14

                          with pleasure.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups