By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

Automatically executing C file.

P: 16
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.
Mar 11 '07 #1
Share this Question
Share on Google+
5 Replies


cyberking
P: 84
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
Mar 11 '07 #2

Expert 100+
P: 1,510
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
Mar 11 '07 #3

P: 16
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
Mar 12 '07 #4

P: 16
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
Mar 12 '07 #5

sicarie
Expert Mod 2.5K+
P: 4,677
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?
Mar 12 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.