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. Database & SysAdmin
  3. System Admin
  4. How an exe file execute???

How an exe file execute???

Scheduled Pinned Locked Moved System Admin
tutorialquestion
11 Posts 5 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.
  • J Offline
    J Offline
    john_tran
    wrote on last edited by
    #1

    How an Exe file excute? Give me a example . Such as : Program a exe file that when it execute, it will show "Hello WORLD" on the screen. Thanks Ask More - Learn More JohnJone

    M Y J 3 Replies Last reply
    0
    • J john_tran

      How an Exe file excute? Give me a example . Such as : Program a exe file that when it execute, it will show "Hello WORLD" on the screen. Thanks Ask More - Learn More JohnJone

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      huh ? you want to know how the OS "runs" an executable or how you can create a program that prints "hello world" ?


      Maximilien Lincourt Your Head A Splode - Strong Bad

      J 1 Reply Last reply
      0
      • J john_tran

        How an Exe file excute? Give me a example . Such as : Program a exe file that when it execute, it will show "Hello WORLD" on the screen. Thanks Ask More - Learn More JohnJone

        Y Offline
        Y Offline
        Yulianto
        wrote on last edited by
        #3

        :omg:


        Work hard and a bit of luck is the key to success.

        You don`t need to be genius, to be rich.

        1 Reply Last reply
        0
        • J john_tran

          How an Exe file excute? Give me a example . Such as : Program a exe file that when it execute, it will show "Hello WORLD" on the screen. Thanks Ask More - Learn More JohnJone

          J Offline
          J Offline
          jlawren7
          wrote on last edited by
          #4

          here is a simple example open notepad. copy and paste this in ************************************ ipconfig /all > C:\ip.txt ************************************ select file save as name "ip.cmd" <--- without quotes in the file type drop list choose "All files" <---- without quotes save it to the desktop locate ip.cmd on the desktop and double click it next open your c:\ drive and open the ip.txt file it should show your ip address, mac address, dns servers etc. this is a simple .exe/.cmd/ etc file .exe means execute this "Code" .cmd means execute this "command" different file extentions but sme results in one of my vb applications, i can do this as a example ************************************** Private Sub Command1_Click() ShellExecute Me.hWnd, "Open", "C:\RMSC LOGIN\AdminHelp.html", "", "", 1 End Sub ************************************** all this is, is a command button that executes & opens a html file in internet explorer hope this helps

          J 1 Reply Last reply
          0
          • J jlawren7

            here is a simple example open notepad. copy and paste this in ************************************ ipconfig /all > C:\ip.txt ************************************ select file save as name "ip.cmd" <--- without quotes in the file type drop list choose "All files" <---- without quotes save it to the desktop locate ip.cmd on the desktop and double click it next open your c:\ drive and open the ip.txt file it should show your ip address, mac address, dns servers etc. this is a simple .exe/.cmd/ etc file .exe means execute this "Code" .cmd means execute this "command" different file extentions but sme results in one of my vb applications, i can do this as a example ************************************** Private Sub Command1_Click() ShellExecute Me.hWnd, "Open", "C:\RMSC LOGIN\AdminHelp.html", "", "", 1 End Sub ************************************** all this is, is a command button that executes & opens a html file in internet explorer hope this helps

            J Offline
            J Offline
            john_tran
            wrote on last edited by
            #5

            No, i dont want to create Exe like that. I want to program with it by using C/C++. For instance, I want to know all about Exe header, so what exe header use for? How can i manage its header? Then, i want to know how to create a file that will execute its information, needn't any program. (where in the exe file i will insert data to execute, and how i do that?) Thanks anyway Ask More - Learn More JohnJone

            M J 2 Replies Last reply
            0
            • M Maximilien

              huh ? you want to know how the OS "runs" an executable or how you can create a program that prints "hello world" ?


              Maximilien Lincourt Your Head A Splode - Strong Bad

              J Offline
              J Offline
              john_tran
              wrote on last edited by
              #6

              yeah, i want to create a file by using c++. (But dont tell me compile cpp file to exe file, it's another way). thanks Ask More - Learn More JohnJone

              1 Reply Last reply
              0
              • J john_tran

                No, i dont want to create Exe like that. I want to program with it by using C/C++. For instance, I want to know all about Exe header, so what exe header use for? How can i manage its header? Then, i want to know how to create a file that will execute its information, needn't any program. (where in the exe file i will insert data to execute, and how i do that?) Thanks anyway Ask More - Learn More JohnJone

                M Offline
                M Offline
                Maximilien
                wrote on last edited by
                #7

                I want to program with it by using C/C++. You need a compiler. ( if you're on Windows, use Visual Studio ). I'm not sure what you mean by Exe Header ( or what you want to say by "Exe Header" ) ? are you talking about #include headers ? or talking about Portable Executable File ( executable file format ) Portable Executable File


                Maximilien Lincourt Your Head A Splode - Strong Bad

                1 Reply Last reply
                0
                • J john_tran

                  No, i dont want to create Exe like that. I want to program with it by using C/C++. For instance, I want to know all about Exe header, so what exe header use for? How can i manage its header? Then, i want to know how to create a file that will execute its information, needn't any program. (where in the exe file i will insert data to execute, and how i do that?) Thanks anyway Ask More - Learn More JohnJone

                  J Offline
                  J Offline
                  jlawren7
                  wrote on last edited by
                  #8

                  You need to specify what you want to do, no-t throw out bits and opeices of what yu want to do you asked for an example that is what you got here is the hello world example #include main() { cout << "Hello World!"; return 0; } One more thng, you need to compile any .cpp , .h ,.c file in order for it to run

                  A 1 Reply Last reply
                  0
                  • J jlawren7

                    You need to specify what you want to do, no-t throw out bits and opeices of what yu want to do you asked for an example that is what you got here is the hello world example #include main() { cout << "Hello World!"; return 0; } One more thng, you need to compile any .cpp , .h ,.c file in order for it to run

                    A Offline
                    A Offline
                    AlexLew
                    wrote on last edited by
                    #9

                    What I understand is this: He wants to make his own compiler, and wants to know the Portable Executable format so he can translate C++ code to the EXE format through his own C++ code.

                    J 1 Reply Last reply
                    0
                    • A AlexLew

                      What I understand is this: He wants to make his own compiler, and wants to know the Portable Executable format so he can translate C++ code to the EXE format through his own C++ code.

                      J Offline
                      J Offline
                      john_tran
                      wrote on last edited by
                      #10

                      Oh.Yes, i want to know what Executable file structure (or Portable file in windows). Because i want to push my program into it, so everytime i double click to this file, it will execute itselft, not need any other program. My Program is made by C++, but i dont want to compile it to exe file(build). I want to make exe file by myself. Clearly, i want to make a compress file that will be execute itself. I knew the compress algorithm (i use LZW) and did successfuly in borland c++. Now, i want to make a exe file for the compressed file so that it will uncompress to the original file when run it. So, How i can push my LZW into executable File (or Portable file). Ask More - Learn More JohnJone

                      M 1 Reply Last reply
                      0
                      • J john_tran

                        Oh.Yes, i want to know what Executable file structure (or Portable file in windows). Because i want to push my program into it, so everytime i double click to this file, it will execute itselft, not need any other program. My Program is made by C++, but i dont want to compile it to exe file(build). I want to make exe file by myself. Clearly, i want to make a compress file that will be execute itself. I knew the compress algorithm (i use LZW) and did successfuly in borland c++. Now, i want to make a exe file for the compressed file so that it will uncompress to the original file when run it. So, How i can push my LZW into executable File (or Portable file). Ask More - Learn More JohnJone

                        M Offline
                        M Offline
                        Maximilien
                        wrote on last edited by
                        #11

                        ok, now we're getting somehere ... look at http://www.codeproject.com/win32/selfextract.asp


                        Maximilien Lincourt Your Head A Splode - Strong Bad

                        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