how to change directory from a registry entry?

  • Thread starter Thread starter mschoonmaker
  • Start date Start date
M

mschoonmaker

I need to be able to replace the system's SHELL with a EXE
(say, 'Excel.exe'), this is no problem for me. However, I
need the EXE to load a particular program ('sample.xls')
that is in another folder (say, 'temp'). This, by itself,
is also no problem.

HOWEVER, I MUST end up executing from the 'temp' folder,
as there is legacy code in the xls file that expects the
currently executing directory to be itself.

In DOS, I would have built a BATCH file with a 'CD \temp'
statement in it before calling the EXE. However, I need to
perform this operation in a single line of code in the
shell statement (in the registry!)
 
mschoonmaker said:
I need to be able to replace the system's SHELL with a EXE
(say, 'Excel.exe'), this is no problem for me. However, I
need the EXE to load a particular program ('sample.xls')
that is in another folder (say, 'temp'). This, by itself,
is also no problem.

HOWEVER, I MUST end up executing from the 'temp' folder,
as there is legacy code in the xls file that expects the
currently executing directory to be itself.

In DOS, I would have built a BATCH file with a 'CD \temp'
statement in it before calling the EXE. However, I need to
perform this operation in a single line of code in the
shell statement (in the registry!)

How 'bout you write that trusty batch file and launch the batch file
from the registry??
 
How 'bout you write that trusty batch file and launch the batch file
from the registry??

Thanks for the respose, but not desireable to take a band-
aid approach. There must be _some_ mechanism for doing
this!

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

Back
Top