New to C#, I'm developing a windows form application inside visual studio. The app uses ICSharpCode.SharpZipLib library to update a zip's content.
When the zip file is inside a non system partition, say like D:\myzip.zip
the files gets updated correctly. But, if the zip is in the system partition, C:\myzip.zip
the app returns an error; Could not find file C:\myzip.zip
even though the file is there!
This has to do with admin privileges because when I run the app as administrator it works.
The question is; how could I enable those privileges by default?
You can add app manifest to exact your app to run as administrator (msdn).
Add the following code to your manifest file:
Adding app manifest step by step:
Edit app manifest file:
you want to enable this by default on you'r computer only right? because on other computer you can't, this what security all about