search

Home  >  Q&A  >  body text

c++ - There are some doubts about the windows operating system.

Q1:

Exe files are binary files, and binary files must be opened through corresponding software?

Q2:

txt is a text file. When opening a text file, do you only need to open it through the corresponding software such as Notepad or WordPad and output it directly to the display? What I briefly mean is that the text file does not need to be compiled by the CPU, and then it can be output directly in the encoding format?

Q3:

A file is a collection of data and instructions. Does it mean that when opening any file, you must run the instructions on the file?

Q4:

If I have an exe file that I want to append to the txt file, is it okay to open the txt file to run the code appended to the back?

Q5:

I want to implement a method that can bundle exe files and txt files into one exe file, and then open the bundled exe file to run the exe file and txt file. How to achieve this? There are responsive software on the Internet, but they are all Trojanized...

Finally, thank you for your answer, thank you.

世界只因有你世界只因有你2749 days ago743

reply all(3)I'll reply

  • 黄舟

    黄舟2017-05-16 13:28:29

    Q1: Exe files are binary files, and binary files must be opened through corresponding software?
    A1: Yes, the file format of exe files can be collectively referred to as "executable file format". Whether it is windows executable file format or unix-like system executable file format, there are many types.

    Q2: txt is a text file. When opening a text file, do you only need to open it through corresponding software such as Notepad or WordPad and output it directly to the display? What I briefly mean is that the text file does not need to be compiled by the CPU, and then it can be output directly in the encoding format?
    A2: Yes, no CPU compilation is required (if you understand the meaning of CPU compilation)

    Q3: A file is a collection of data and instructions. Does it mean that when opening any file, the instructions on the file must be run?
    A3: "A file is a collection of data and instructions." This sentence is said in context and does not and cannot refer to any file.
    Besides, I am not wrong when I say that any file is just data.

    Q4: If I have an exe file that I want to append to the back of a txt file, is it okay to open the txt file to run the code appended to the back?
    A4: No, please refer to the reply section of Q1

    Q5: I want to implement a method that can bundle exe files and txt files into one exe file, and then open the bundled exe file to run the exe file and txt file. How to achieve this? There are responsive software on the Internet, but they are all loaded with Trojans...
    A5: You need to first understand the principle and implementation of running exe files, and then, what do you mean by running txt files?

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 13:28:29

    I want to implement a method that can bundle exe files and txt files into one exe file, and then open the bundled exe file to run the exe file and txt file. How to achieve this?

    Use the command line, type my.txt >> my.exemy.txt是你的txt文件路径,my.exe is the path to your exe file. It is recommended to add the length of the txt file at the end. For example, the program code can first read the last 4 bytes to find the length of the txt file, and then read the txt file itself. Now you can perform any operation on the txt text. Note that this method does not apply to programs that require code signing.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 13:28:29

    Yes, yes, yes, yes, yes

    reply
    0
  • Cancelreply