Customize NVS installation script
This commit is contained in:
parent
10559c02e4
commit
a8534f6872
2 changed files with 21 additions and 7 deletions
|
@ -157,13 +157,7 @@ function Restore-PersonalApps([Context] $context) {
|
|||
python `
|
||||
visualstudio2019-workload-vctools;
|
||||
|
||||
$env:NVS_HOME="$env:ProgramData\nvs";
|
||||
git clone "https://github.com/jasongin/nvs.git" "$env:NVS_HOME";
|
||||
& "$env:NVS_HOME\nvs.cmd" install;
|
||||
|
||||
refreshenv;
|
||||
nvs add latest;
|
||||
nvs link latest;
|
||||
. "$PSScriptRoot/../Software/NVS/Install.ps1";
|
||||
|
||||
# Terminal
|
||||
@($PROFILE, (powershell -c '$PROFILE')) | ForEach-Object {
|
||||
|
|
20
scripts/Windows/Software/NVS/Install.ps1
Normal file
20
scripts/Windows/Software/NVS/Install.ps1
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/pwsh
|
||||
$env:NVS_HOME="$env:ProgramData\nvs";
|
||||
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(
|
||||
[System.Security.AccessControl.FileSystemAccessRule]::new(
|
||||
[System.Security.Principal.SecurityIdentifier]::new([System.Security.Principal.WellKnownSidType]::BuiltinUsersSid, $null),
|
||||
[System.Security.AccessControl.RegistryRights]::FullControl,
|
||||
[System.Security.AccessControl.InheritanceFlags]::ObjectInherit -bor [System.Security.AccessControl.InheritanceFlags]::ContainerInherit,
|
||||
[System.Security.AccessControl.PropagationFlags]::InheritOnly,
|
||||
[System.Security.AccessControl.AccessControlType]::Allow));
|
||||
|
||||
Set-Acl "$env:NVS_HOME" $acl;
|
||||
|
||||
refreshenv;
|
||||
nvs add latest;
|
||||
nvs link latest;
|
Loading…
Reference in a new issue