I have publish a app that read png files and binary files from resources in
C:\Program Files\WindowsApps\name publisher\Mollier_Hvac_Simulation\Resources
Reading png files work well with:
PictureBox1.BackgroundImage = My.Resources.a1 a1=picture png
But with binary file not:
file_name = "a1.sip" // is a binary file
Find directory resources :
Dim resFolder As String = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "Resources")
then set CurrentDirectory :
My.Computer.FileSystem.CurrentDirectory = resFolder
' Create the reader for data.
Dim fs As New FileStream(file_name, FileMode.Open)
Dim r As New BinaryReader(fs)
This works fine on mine computer but after publishing
i get no access to the file
System.UnauthorizedAccessException: Access to the path 'C:\Program Files\WindowsApps\Resources\a1.sip'
Only when i change the admin rights on the other computer then it works good.
But i can't change admin rights on computer of custumers.
Kindly Regards
Piet