prototpye for powershell script to be executed after installation

This commit is contained in:
Armin Schrenk
2023-01-30 13:30:06 +01:00
parent 0d8d7e4ee5
commit a106b04c7e
+12
View File
@@ -0,0 +1,12 @@
$settingsPath = 'C:\Users\Arbeit\AppData\Roaming\Cryptomator-Dev\settings1617.json'
$settings = Get-Content -Path $settingsPath | ConvertFrom-Json
$atLeastOneCustomPath = $false;
foreach ($vault in $settings.directories){
$atLeastOneCustomPath = $atLeastOneCustomPath -or ($vault.useCustomMountPath -eq "True")
}
if( $atLeastOneCustomPath -and ($settings.preferredVolumeImpl -eq "FUSE")) {
Add-Member -Force -InputObject $settings -Name "mountService" -Value "org.cryptomator.frontend.fuse.mount.WinFspMountProvider" -MemberType NoteProperty
$newSettings = $settings | Select-Object * -ExcludeProperty "preferredVolumeImpl"
ConvertTo-Json $newSettings | Set-Content -Path $settingsPath
}