简体   繁体   中英

Unable to read a zip file from MSI package

I am using Advanced installer version 18.6.1. I've created a MSI package with .NET Core API app. I want to read a zip file in my application from APPDIR directory added from "Files and Folders". The exception from my logs;

An unhandled exception of type 'System.UnauthorizedAccessException' occurred in System.IO.Compression.FileSystem.dll Additional information: Access to the path 'C:\\My_App_Dir_Includes_Zip\\My_Zip_File.zip' is denied.

Note: I added IIS_USER and SYSTEM user roles while packaging the MSI file which are assigned to my "My_App_Dir_Includes_Zip" folder.

This may happens if you need to impersonate installing user. From the file download operation dialog you need to enable the "Impersonate installing user" option: 在此处输入图片说明

This way, the file download operation is done as the user installing the application, not under the Local System account.

If using Program Files as install location, you may need admin privileges when extracting the archive. Or, you can assign Everyone write permissions in that location through the Permissions tab.

Note that Advanced Installer offers also predefined funcionality to Extract Archive .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM