Automatically executing C file.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • udhayakarthick
    New Member
    • Nov 2006
    • 16

    Automatically executing C file.

    Hai everybody,
    How can i write a C program such that it should automatically execute while logging on into the system.The compiler which i am using is TURBO C++ compiler.The operating system which i am using is WINDOWS XP.
    I will be happy if any one helps me regarding this.


    Thank you in advance,
    Udhaya karthick.
  • cyberking
    New Member
    • Jan 2007
    • 84

    #2
    Originally posted by udhayakarthick
    Hai everybody,
    How can i write a C program such that it should automatically execute while logging on into the system.The compiler which i am using is TURBO C++ compiler.The operating system which i am using is WINDOWS XP.
    I will be happy if any one helps me regarding this.


    Thank you in advance,
    Udhaya karthick.
    Hi Udhaya!

    Fantastic! i love this topic. Wat you are actually tryin upon is to make a program which shall be memory resident and performs behind the applications. Hmmm.. Wat you can actually do is type in your program in Turbo C compiler. Then, compile it. You shall now have an EXE file in the output directory. in order to make it execute simultaneous to system log on, you shall have to include the .EXE file into the Autoexec.BAT file. Please note that the .EXE file also has to be included into the sytem32 sub-directory of windows directory. Now how you shall include the .EXE file into the Autoexec.BAT file, I think this shouldnt be a problem. Just open the .BAT file in system32 sub directory and see the way several .EXE files are included. Copy one such statement and replace the file name by your .EXE file name. nonetheless, you should have the .EXE file in the system32 sub directory.

    think thats enough to keep you from executing your files the way u wish them to. This is actually the way TSR's work. (Terminate and Stay Resident).

    Let me know if it helps you.

    regards
    CyberKing

    Comment

    • horace1
      Recognized Expert Top Contributor
      • Nov 2006
      • 1510

      #3
      Originally posted by udhayakarthick
      Hai everybody,
      How can i write a C program such that it should automatically execute while logging on into the system.The compiler which i am using is TURBO C++ compiler.The operating system which i am using is WINDOWS XP.
      I will be happy if any one helps me regarding this.


      Thank you in advance,
      Udhaya karthick.
      under XP you can schedule programs to start when you want.
      click Start, All Programs, Accessories, System Tools and Scheduled Tasks
      you then add a scheduled task

      Comment

      • udhayakarthick
        New Member
        • Nov 2006
        • 16

        #4
        Originally posted by horace1
        under XP you can schedule programs to start when you want.
        click Start, All Programs, Accessories, System Tools and Scheduled Tasks
        you then add a scheduled task
        Thank u for ur help!
        Its working fine.But what the thing i ask is that the program should do this....
        Any idea?


        Regards,
        Udhaya

        Comment

        • udhayakarthick
          New Member
          • Nov 2006
          • 16

          #5
          Originally posted by cyberking
          Hi Udhaya!

          Fantastic! i love this topic. Wat you are actually tryin upon is to make a program which shall be memory resident and performs behind the applications. Hmmm.. Wat you can actually do is type in your program in Turbo C compiler. Then, compile it. You shall now have an EXE file in the output directory. in order to make it execute simultaneous to system log on, you shall have to include the .EXE file into the Autoexec.BAT file. Please note that the .EXE file also has to be included into the sytem32 sub-directory of windows directory. Now how you shall include the .EXE file into the Autoexec.BAT file, I think this shouldnt be a problem. Just open the .BAT file in system32 sub directory and see the way several .EXE files are included. Copy one such statement and replace the file name by your .EXE file name. nonetheless, you should have the .EXE file in the system32 sub directory.

          think thats enough to keep you from executing your files the way u wish them to. This is actually the way TSR's work. (Terminate and Stay Resident).

          Let me know if it helps you.

          regards
          CyberKing

          Thanks for replying me but the thing is i don't find the Autoexec.BAT file in the system32 folder.
          Can u explain me more. if u don't mind.

          Thank u in advance,
          Udhaya

          Comment

          • sicarie
            Recognized Expert Specialist
            • Nov 2006
            • 4677

            #6
            Originally posted by udhayakarthick
            Thanks for replying me but the thing is i don't find the Autoexec.BAT file in the system32 folder.
            Can u explain me more. if u don't mind.

            Thank u in advance,
            Udhaya
            Try doing a search of your computer - mine is not located in system32 either.

            horace's idea is easier and will accomplish the same thing - or are you trying to make this program some sort of daemon?

            Comment

            Working...