Skip to content

[MSI] System.UnauthorizedAccessException: Access to the path 'C:\Program Files\[app-folder]\packages' is denied. #879

@pmieten

Description

@pmieten

I used version: 0.0.1589-ga2c5a97 (prerelease) for vpk and nuget library
build msi with options:

    "--msi" ,""
    "--instLocation" , "PerMachine"
    "--msiVersion",  ($Version.trim()+ ".0")

during update there is Unauthorized issue:

System.UnauthorizedAccessException: Access to the path 'C:\Program Files\[app-folder]\packages' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.DirectoryInfo.Create()
   at Velopack.Locators.VelopackLocator.CreateSubDirIfDoesNotExist(String baseDir, String newDir)
   at Velopack.Locators.WindowsVelopackLocator.get_PackagesDir()
   at Velopack.Locators.VelopackLocator.GetOrCreateStagedUserId()
   at Velopack.UpdateManager.CheckForUpdatesAsync()
   at Ms.Dc.Ui.Services.VelopackUpdateService.CheckAndDownloadUpdateAsync(String downloadUrl, String targetVersion)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions