Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   need help to link an exe with startup (http://www.go4expert.com/forums/help-link-exe-startup-t11195/)

dssr 7Jun2008 21:16

need help to link an exe with startup
 
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

Bhullarz 7Jun2008 23:08

Re: need help to link an exe with startup
 
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

dssr 8Jun2008 13:37

Re: need help to link an exe with startup
 
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

Bhullarz 12Jun2008 13:24

Re: need help to link an exe with startup
 
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.

dssr 13Jun2008 23:53

Re: need help to link an exe with startup
 
still no help :cryin: used process.h but no help, same problem

dssr 6Jul2008 07:52

Re: need help to link an exe with startup
 
okay used C Free compiler,it's working


All times are GMT +5.5. The time now is 11:24.