Custom shell

G

Guest

I create an XPE image with a custom shell. My problem is that when my
application starts automatically an error path occure. if I confirm the error
and I load it manually again, all work fine. What could be the possible
reason? Consider that in my application I use relative paths. Just as a test
I try to use the absolute path and the problem desappear. Someone has an
explanation for it? How can I solve the problem? My idea is that when the
application starts, the OS doesn't have loaded already the full structure of
directories or some services. Is it possible?

Is it possible to force the path of my application into the list of paths
that the OS load at the beginning?

Thanks a lot

Marco
 
M

Mike Warren

Marco said:
Is it possible to force the path of my application into the list of paths
that the OS load at the beginning?

I don't know what is causing your problem but why don't you
store the literal path in a file?

That's what I do. All the file names I need to access are saved
to a file similar to an ini file along with other config data.

Just a thought. Is a file you are accessing on a removable drive?
Maybe it isn't available at the time.

-Mike
 
G

Guest

the application works in this way, so I've all the paths saved in an ini
file, but when my application try to open this file, it dosen't find the file
in the relative path that I've written in the application.

I don't think that the problem is the disk because the application starts so
it means that the disk is accesible.

Thanks
 
M

Mike Warren

Marco said:
the application works in this way, so I've all the paths saved in an
ini file, but when my application try to open this file, it dosen't
find the file in the relative path that I've written in the
application.

If you are specifying files like this: C:\MyProgDir\MyDataDir\MyFile
it should work.

Is that how you are doing it, or are you doing something like this?
MyDataDir\MyFile

The second method requires the working directory be set to
C:\MyProgDir.

You could try calling SetCurrentDirectory() before accessing
any files.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top