Re: strang, isn't it?

From: DAMAR (DAMAR_at_discussions.microsoft.com)
Date: 03/25/05


Date: Thu, 24 Mar 2005 22:47:02 -0800

Hello

Here is the error message :
"An unhandled exception has occured in your application..... .Config file
APP.exe.config cannot be read successfully due to exception:
System.IO.FileNotFoundException..."

But it is only if I start this app not "manually" ,here is the code:

Process myProcess = new Process();
myProcess.StartInfo.FileName="C:\\App.exe";
myProcess.Start();

If I start it from explorer everything is all right. So what am I doing
wrong here?
Damar

"Nick Malik [Microsoft]" wrote:

> Please post the complete text of the error message.
>
> I assume that this is a console application, since you are starting it when
> Windows starts. Did you create this as a service?
>
> If not, first answer "why not?" so I can understand your constraints and
> then please tell me the location in the registry that you are using to
> denote you want the app to start on start-up (so I can repro the problem.
> There's more than one registry setting that can be used like this).
>
> If possible, can you post a small but complete app that recreates this
> problem?
>
> --
> --- Nick Malik [Microsoft]
> MCSD, CFPS, Certified Scrummaster
> http://blogs.msdn.com/nickmalik
>
> Disclaimer: Opinions expressed in this forum are my own, and not
> representative of my employer.
> I do not answer questions on behalf of my employer. I'm just a
> programmer helping programmers.
> --
> "DAMAR" <DAMAR@discussions.microsoft.com> wrote in message
> news:6A9B90D0-404E-405D-8844-70487A98FE15@microsoft.com...
> > Hello
> > I have (strange for me) problem. I have developed an application , let's
> > say
> > MyApp.exe. This is win-forms application. It has its own configuration
> > file,
> > generated of course by VS.NET and called MyApp.exe.config.
> > I put a path to this application into registry, that the app starts when
> > windows will start. A problem is that I have an error when the app
> > starts -
> > .exe.config could not be found. But If I start this app manually
> > everythig
> > works fine
> > What could be a problem? Maybe I should modify the registry entry and pass
> > the config file as a parameter?
> > Thanks for any suggestions
> > Damar
> >
>
>
>



Relevant Pages

  • Re: Mobile Service & Auto Start
    ... The RegRestoreFile API is only supported by the object store-based registry. ... have never needed to write an app like this and I just figured ... So I have an exe that I start 5 min after I push a button. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: CLI-kiddies/advocates ?
    ... On Sun, 27 Nov 2005 20:01:55 GMT, Aragorn staggered into the Black Sun ... all the 4.n Xs are supposed to use the same config file format. ... having may be due to compatability libraries, or if the app is really ... post the error messages from the problem app's startup. ...
    (comp.os.linux.misc)
  • Re: Why isnt intellisense ON a default?
    ... Use of the registry was supposed to do away with having a config file for every program and component in the system. ... One that is nice is the HKCU branch of the registry as it lets you store stuff that is basically the same information but unique for each user of the computer. ... I guess it matters not since those of us who still have to market products have to move to something other than VFP anyways (yes our users actually are including things such as "VFP is not acceptable as a development environment" in the RFP's and in technical standards. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Ini File vs Registry
    ... How do you manage the settings? ... dollars in hacking the OS to introduce the concept of registry ... Hard to migrate app ... but increasingly desktop developers are fighting it out ...
    (microsoft.public.vc.mfc)
  • Re: VFP Updates?
    ... Account", which is what many users do, e.g. in company networks. ... WinXP limited accounts as well as Vista UAC is quite easy ... considerations for installing and running a VFP app in Vista. ... directory/folder IS), and you don't need to write to registry, I think ...
    (microsoft.public.fox.programmer.exchange)