need help to link an exe with startup

Go4Expert Member
7Jun2008,21:16   #1
dssr's Avatar
Hii this is my first post requesting a help for u experts, i have basic knowledge of C & C++, i want to create an application which requires whenever i start the windows it starts automatically,(i.e. i want to link it with my startup) i want to run the exe whenever my windows starts


let me clarify a bit, the exe will run but wont show on the screen, say after starting the windows when i am at my desktop and no other text editor is running, if i type something another window will pop up showing my text

any help regarding this
Skilled contributor
7Jun2008,23:08   #2
Bhullarz's Avatar
You can use registry option to run any exe file at startup. just use the command "system()". and pass the registry command to add the file into system startup. ALl this can be done in ur c/C++ program
Go4Expert Member
8Jun2008,13:37   #3
dssr's Avatar
thanks for the help, but system command is not running in my compiler

i have borland, turbo c++ 4.5 and an older dos based version of turbo c

in borland the program is compiling but then giving some error
in turbo c++ 4.5 program is not compiling at all giving error "_system command is undefined or something like this
and in the older version of turbo c it's compiling successfully and then running but nothing comes except a blank window and if i use a print or some other command with it that's coming in this case


can u help me out with it??

the code i am using

Code:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    system("dir");
    return 0;
}
thanxx in advance
Skilled contributor
12Jun2008,13:24   #4
Bhullarz's Avatar
try including process.h library too. I have turbo c++ compiler version 3.00. If that version is executing SYSTEM command, then ur compiler should do so.
Go4Expert Member
13Jun2008,23:53   #5
dssr's Avatar
still no help used process.h but no help, same problem
Go4Expert Member
6Jul2008,07:52   #6
dssr's Avatar
okay used C Free compiler,it's working