Application Data folder location

  • Thread starter Thread starter Bry
  • Start date Start date
B

Bry

My code uses System.Environment.GetFolderPath() to determine the
location of the application data folder. This works fine, until I
execute my application using runas, when it is unable to resolve the
path to the directory. The target directory does exist in the other
profile.

Can anyone suggest a way around this whilst keeping my code as
compliant as possible?
 
cud ya plz try these

1. executable relavent
Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)

2.Window user profile (executable independant)
System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

Hope this helps
 

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