Add a function for allowing user access
This commit is contained in:
parent
92e4889417
commit
505ee2ad34
2 changed files with 30 additions and 11 deletions
scripts/Windows/Software/NVS
|
@ -6,6 +6,7 @@ param(
|
|||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../Scripts/Security.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
|
||||
|
@ -19,18 +20,8 @@ Start-SoftwareInstaller @PSBoundParameters `
|
|||
git clone "https://github.com/jasongin/nvs.git" $env:NVS_HOME;
|
||||
& "$env:NVS_HOME\nvs.cmd" install;
|
||||
|
||||
$acl = Get-Acl $env:NVS_HOME;
|
||||
|
||||
$acl.AddAccessRule(
|
||||
[FileSystemAccessRule]::new(
|
||||
[SecurityIdentifier]::new([WellKnownSidType]::BuiltinUsersSid, $null),
|
||||
[FileSystemRights]::FullControl,
|
||||
[InheritanceFlags]::ObjectInherit -bor [InheritanceFlags]::ContainerInherit,
|
||||
[PropagationFlags]::InheritOnly,
|
||||
[AccessControlType]::Allow));
|
||||
|
||||
Set-Acl $env:NVS_HOME $acl;
|
||||
refreshenv;
|
||||
Set-UserPermissions $env:NVS_HOME;
|
||||
& $Installer -Action ([InstallerAction]::Configure);
|
||||
} `
|
||||
-Configurator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue