-
November 22nd, 2004, 12:14 PM
#1
Local folder problem
I programming in c++ and I need help.
I made one program that should run other program, but i got one problem
Program unable to run program if it running directly from other folder.
t.ex.
program located in folder
c:\windows\progs\myprog.exe
I starting it in command line from root C:\
and program showing that path not found
but when i opening c:\windows\progs\ and then running program, so it works.
....
how can I make program to find folder that it was running from. (programs local folder and run other program from this folder)
// too far away outside of limit
-
November 22nd, 2004, 12:18 PM
#2
2 ideas:
a) add called program' path to PATH
b) call "called program" using absolute path (full path). Windows is good but isnt magic; it cant find a program in you disk if you dont give it some tips
Meu sÃtio
FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
If I die before I sleep, I pray the Lord my soul to encrypt. If I die before I wake, I pray the Lord my soul to brake.
-
November 22nd, 2004, 12:22 PM
#3
How can I make my program to identify what folder it was runing from?
// too far away outside of limit
-
November 22nd, 2004, 12:29 PM
#4
I using stdlib.h and system() to run other programs, but do some one know some other way to do it?
// too far away outside of limit
-
November 22nd, 2004, 06:59 PM
#5
CreateProcess
to start one, also other process API's are on this site,
and GetCwd to get the current working directory.
hope this helps
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|