Change hard-coded folder name to support Vista

This commit is contained in:
Rich 2008-04-15 17:09:28 +00:00
parent a9d0b2695f
commit 292f991420

View File

@ -62,7 +62,10 @@ namespace VEPROMS.CSLA.Library
{
if (_TemporaryFolder == null)
{
_TemporaryFolder = string.Format(@"C:\Documents and Settings\{0}\Local Settings\Temp", Environment.UserName);
// This will create a Temp\VE-PROMS folder in the LocalSettings Folder.
//XP - C:\Documents and Settings\{user}\Local Settings\Application Data\Temp\VE-PROMS
//Vista - C:\Users\{user}\AppData\Local\Temp\VE-PROMS
_TemporaryFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Temp";
if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);
_TemporaryFolder += @"\VE-PROMS";
if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);