问题描述
在我的Silverlight应用程序,我使用正则SaveFileDialog用于提示用户节省一些文件。
In my Silverlight application I'm using regular SaveFileDialog for prompt user to save some file.
现在的问题是,在一些Windows 7的计算机上,如果用户使用IE浏览器在保护模式下,尽量节省,例如在桌面上,对于保存路径结束这样的:
The problem is that on some Windows 7 computers, if user use IE in protected mode, and try to save to for example on desktop, path for saving ends up like this:
C:\Users\<user>\Appdata\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\<user>\Desktop
是否有人知道在哪里可以找到,表明此路径将被用来代替Windows上常规的一面旗帜或价值?
Does anybody know where I can find flag or value indicating that this path will be used instead of regular one on windows?
感谢您
推荐答案
所以经过一点研究I'm的恐怕就没有标志或值,表示一个虚拟化路径...
So after a bit of research I´m afraid there is no Flag or Value which Indicates a Virtualized Path...
我知道it'sa点点俄语,但假设这是静态
I know it´s a little bit russian but assuming that this is static
\Microsoft\Windows\Temporary互联网Files\Virtualized\
你可以做这样的事情来检查路径指向虚拟文件夹
You could do something like this to check if the Path points to the Virtualized Folder
public static bool IsPathVirtualized(string path)
{
bool isVirtualized = false;
string pathToVirtualizedUserFolder = Path.Combine
(
Environment.SpecialFolder.LocalApplicationData +
@"Microsoft\Windows\Temporary Internet Files\Virtualized\"
);
if(path.StartsWith(pathToVirtualizedUserFolder))
{
isVirtualized = true;
}
return isVirtualized;
}
这篇关于使用在某些计算机上虚拟路径Temp目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!