You can't write to any location from Windows Store apps because they are sandboxed, you can only write to app's local folder:
string text = "Hello, world";
StorageFolder folder = ApplicationData.Current.LocalFolder;
StorageFile file = await folder.CreateFileAsync("data.txt");
if (file != null)
{
await FileIO.WriteTextAsync(file, text);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…