PC Review


Reply
Thread Tools Rate Thread

Configuration file issue

 
 
Job Lot
Guest
Posts: n/a
 
      5th Mar 2008
How can I make my application to expect config file under “C:\Documents and
Settings\All Users\Application Data\MyApplication” folder rather install
folder.

My app performs read/write operation on application configuration file that
gets installed under application folder (c:\program files\My Application). It
works alright on XP, but as soon as I run it on VISTA machine, I start
hitting virtualization & UAC issues.

How can make my app run under VISTA? Can I move the config file under
“C:\Documents and Settings\All Users\Application Data” folder? If yes, how
can I make my app to expect config file under “C:\Documents and Settings\All
Users\Application Data” rather app folder.

Thanks

 
Reply With Quote
 
 
 
 
dlm@bypsoft
Guest
Posts: n/a
 
      5th Mar 2008
Hi,
to read your configuration from some location you can use something similar to the code below:
string sPath = System.IO.Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "yourExe.exe");

Configuration config = ConfigurationManager.OpenExeConfiguration(sPath);

Take a look for different values of enum type Environment.SpecialFolder.

I hope this helps you.

Regards,

dlm@bypsoft
Compare Databases - SQL Server, MySQL, Oracle for free
www.bypsoft.com

"Job Lot" <(E-Mail Removed)> schrieb im Newsbeitrag news:751445E4-AA94-4DF8-A6EE-(E-Mail Removed)...
> How can I make my application to expect config file under “C:\Documents and
> Settings\All Users\Application Data\MyApplication” folder rather install
> folder.
>
> My app performs read/write operation on application configuration file that
> gets installed under application folder (c:\program files\My Application). It
> works alright on XP, but as soon as I run it on VISTA machine, I start
> hitting virtualization & UAC issues.
>
> How can make my app run under VISTA? Can I move the config file under
> “C:\Documents and Settings\All Users\Application Data” folder? If yes, how
> can I make my app to expect config file under “C:\Documents and Settings\All
> Users\Application Data” rather app folder.
>
> Thanks
>

 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      6th Mar 2008
Add a Manifest to your app. See
http://blogs.msdn.com/shawnfa/archiv...06/568563.aspx

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP


"Job Lot" <(E-Mail Removed)> wrote in message
news:751445E4-AA94-4DF8-A6EE-(E-Mail Removed)...
> How can I make my application to expect config file under "C:\Documents
> and
> Settings\All Users\Application Data\MyApplication" folder rather install
> folder.
>
> My app performs read/write operation on application configuration file
> that
> gets installed under application folder (c:\program files\My Application).
> It
> works alright on XP, but as soon as I run it on VISTA machine, I start
> hitting virtualization & UAC issues.
>
> How can make my app run under VISTA? Can I move the config file under
> "C:\Documents and Settings\All Users\Application Data" folder? If yes, how
> can I make my app to expect config file under "C:\Documents and
> Settings\All
> Users\Application Data" rather app folder.
>
> Thanks
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: configuration issue IraP Microsoft Outlook Installation 0 23rd Apr 2008 05:33 PM
ATI Configuration Issue Jon Wells ATI Video Cards 2 22nd Jul 2006 07:12 PM
Configuration Application Block: Multiple configuration sections in one file: probashi Microsoft C# .NET 1 21st Mar 2005 10:50 AM
computer configuration versus user configuration issue =?Utf-8?B?S2lkIEtvb2lqbWFucw==?= Microsoft Windows 2000 Active Directory 1 16th Mar 2005 11:15 AM
Windows service configuration - registry or configuration file? Ken Brady Microsoft Dot NET Framework 1 18th Feb 2005 03:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:37 AM.