Tuesday, June 22, 2010

Change the AppDomain's Base Directory and Environment Directory

Update AppDomain's Base Directory
String root_path = "c:\\temp\\";
AppDomain.CurrentDomain.SetData("APPBASE", root_path);

Retrieve AppDomain's Base Directory
AppDomain.CurrentDomain.BaseDirectory.ToString()

Update Environment's Current Directory
Environment.CurrentDirectory = root_path;

1 comment:

skid said...

You should probably not modify application base path, but that helped. Thanks!

Post a Comment