Is there a way to copy a file (selected using filepicker) into the installdir of the current metro style application? I tried to get InstallationFolder using:
Windows.ApplicationModel.Package package = Windows.ApplicationModel.Package.Current;
Windows.Storage.StorageFolder installedLocation = package.InstalledLocation;
But when getting InstalledLocation, I always get the following error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
Perhaps this is a problem with debugging the application / not installing it from the store? How to fix this exception?
A copy of the file should be possible with Windows.Storage.CopyAsync(IStroageFolder, ...). InstalledLocation is a type StorageFolder. Someone has some experience if this is allowed or I will get sth. as a security exception?
source
share